/* 1 program of swap 2 number */
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,t;
clrscr();
printf("Enter a number for a :");
scanf("%d",&a);
printf("Enter a number for b :");
scanf("%d",&b);
t=a, a=b, b=t;
printf("value of a=%d\nvalue of b=%d",a,b);
getch();
}
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,t;
clrscr();
printf("Enter a number for a :");
scanf("%d",&a);
printf("Enter a number for b :");
scanf("%d",&b);
t=a, a=b, b=t;
printf("value of a=%d\nvalue of b=%d",a,b);
getch();
}
No comments:
Post a Comment