#include<stdio.h> main() { int num1,num2,temp; printf("Enter number 1 : "); scanf("%d",&num1); printf("Enter number 2 : "); scanf("%d",&num2); printf("Before swapping\n"); printf("number 1 is %d and number 2 is %d\n",num1,num2); temp=num1; num1=num2; num2=temp; printf("After swapping \n"); printf("number 1 is %d and number 2 is %d\n",num1,num2); }
New Android apps UniqueKey
Friday 20 February 2015
Swapping using temp variable
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment