Wednesday, 30 August 2017

C program for Swapping two numbers

PROGRAM :  Swapping two numbers

#include<stdio.h>
int main()
{
    int a,b,temp; 
    printf("Type value of A : ");
           scanf("%d",&a);
    printf("\nType value of b : ");
          scanf("%d",&b);
     temp=a;
     a=b;
     b=temp;
    printf("A : %d",a);
    printf("\nB : %d",b);
 return 0;
}

OUTPUT :


No comments:

Post a Comment