Swap
Numbers:
#include <stdio.h>
int main()
{
int n1,
n2, temp;
printf("Enter first number: ");
scanf("%d", &n1);
printf("Enter second number: ");
scanf("%d",&n2);
temp=n1;
n1 = n2;
n2=temp;
printf("\nAfter swapping, firstNumber = %d\n", n1);
printf("After swapping, secondNumber = %.d", n2);
return
0;
}
0 comments:
Post a Comment
if you have any doubt please let me know