C program to swap 2 numbers.

#include<stdio.h>
#include<conio.h>
void main()
{
 clrscr();
 int a, b, temp;
 printf("Enter value of A and B : \n");
 printf("A = ");
 scanf("%d",&a);
 printf("B = ");
 scanf("%d",&b);
 temp=a;
 a=b;
 b=temp;
 printf("Number interchanged successfully..!!\n");
 printf("A = %d\nB = %d",a,b);
 getch();
}
C program to swap 2 numbers. C program to swap 2 numbers. Reviewed by on December 22, 2019 Rating: 5

No comments:

Powered by Blogger.