1: #include <stdio.h>
2: int main()
3: {
4: int x, y, temp;
5: printf("Enter the value of x and y\n");
6: scanf("%d%d", &x, &y);
7: printf("Before Swapping\nx = %d\ny = %d\n",x,y);
8: temp = x;
9: x = y;
10: y = temp;
11: printf("After Swapping\nx = %d\ny = %d\n",x,y);
12: return 0;
13: }
getsprogramming Tutorials , C Programming, CPP Programming and JAVA Programming , Python Programming , Javascript Programming Welcome to getsprogramming Blog Here You Find Different Programs in Easier way to Explain and gain Knowledge and Try Your Self..Thanks
Friday, 10 July 2015
Write C Program to Swap two numbers
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment