Program to swap 2 numbers by using 3 numbers, taking input from user in C language. #1

/*Made by Anmol main
Student B.tech Cse
Punjabi university Patiala
Program 01 */

#include<stdio.h>

int main()
{int a,b,c//write the fixed values of a and b if not then take it from the user

    printf("Enter 1st number a\n");
    scanf("%d",&a);
    printf("Enter 2nd number a\n");
    scanf("%d",&b);
    
    printf("Numbers before swapping %d , %d ",a,b);
    
    c=a;
    a=b;
    b=c;
    printf("\nNmbers after swapping %d, %d",a,b);
    return 0;
}

Comments

Popular posts from this blog

Glowing-Log-in-window-in-Pure-html-css #30

Hand cricket Game in C language - source code ( Program 15)