C Program To Swap Two Value Using Third Varible

C Program To Swap Two Value Using Third Varible

/*C Program To Swap Two Value Using Third Varible*/

#include<stdio.h>
#include<math.h>

int main()
{   int a,b,temp;
    printf("Enter The Value Of A:--");
    scanf("%d",&a);
    printf("Enter The Value Of B:--");
    scanf("%d",&b);
    printf("Befor Swapping!!!");
    printf("\nA:%d",a);
    printf("\nB:%d",b);
    temp=a;
    a=b;
    b=temp;
    printf("\nAfter Swapping!!!");
    printf("\nA:%d",a);
    printf("\nB:%d",b);
    return 0;
}

Post a Comment

0 Comments