#include <stdio.h>
int main()
int x, y, temp;
printf("Enter the value of x and y
");
scanf("%d%d", &x, &y);
printf("Before Swapping
x = %d
y = %d
",x,y);
temp = x;
x = y;
y = temp;
printf("After Swapping
x = %d
y = %d
",x,y);
return 0;
}
Output:
Enter the value of x and y:3 4
Before Swappingx = 3 y =4
After Swappingx = 4 y =3
ليست هناك تعليقات:
إرسال تعليق