swapping

Akilaeaswari · September 23, 2020 · C
#include <stdio.h>

int main() {
    int first_no,second_no,temp;
    printf("enter  first numper:");
    scanf("%d",&first_no);
    printf("%d",first_no);
    printf("enter  second numper:");
    scanf("%d",&second_no);
    printf("%d",second_no);
    temp=first_no;
    first_no=second_no;
    second_no=temp;
    printf("after swapping\n");
    printf("first numper:%d",first_no);
    printf("\nsecond numper:%d",second_no);
    return 0;
}

Comments

Please sign up or log in to contribute to the discussion.