A program Swap using third variable
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | #include<stdio.h> int main() { int a,b,t; a=4; b=6; printf("a=%d\nb=%d\n",a,b); printf("---------------\n"); t=a; a=b; b=t; printf("a=%d\nb=%d",a,b); } |
A blog about programming languages and this Blog specially Create for learning languages like C language,C++ Language, Data Structure and Algorithm.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | #include<stdio.h> int main() { int a,b,t; a=4; b=6; printf("a=%d\nb=%d\n",a,b); printf("---------------\n"); t=a; a=b; b=t; printf("a=%d\nb=%d",a,b); } |
Post a Comment