Skip to main content

C program to swap two number

C program to Swap two Number

Code:

#include<stdio.h>
void main(){
int n1,n2,temp;
printf("enter two number :");
scanf("%d %d", &n1,&n2);
temp=n1;
n1=n2;
n2=temp;
printf("after swaping two number %d  %d\n",n1,n2);
}

Output:

Comments