You're online now.

Hurray! you are online now.

Swap two number c programming

// Write a c program to swap two number using third variable.
    #include<stdio.h>
    
    int main()
    {
        
        int a, b;
        printf("Enter the value of a : ");
        scanf("%d", &a);
        
        printf("Enter the value of b : ");
        scanf("%d", &b);
        
        int temp;
        temp = a;
        a = b;
        b = temp;
        
        printf("The value of a is %d and b is %d", a, b);
    
        return 0;
    }
    
🖤 0
Buy me coffee ☕

Comments

Oops!

No comments here...