Swapping of Two number
C Program to Swapping of Two number
#include<conio.h>
#include<stdio.h>
void main()
{
int num1,num2,temp=0;
clrscr();
printf("Enter first number : ");
scanf("%d",&num1);
printf("Enter second number : ");
scanf("%d",&num2);
printf("\n\nValue of A: %d and Value of B: %d",num1,num2);
temp=num1;
num1=num2;
num2=temp;
printf("\n\n\n After swaping \n\n");
printf("Value of A: %d and Value of B: %d",num1,num2);
getch();
}
out put

Comments
Post a Comment