You are currently viewing Swap two Numbers using a variable

Swap two Numbers using a variable

  • Post author:
  • Post published:August 25, 2023
  • Post category:c language
#include<stdio.h>
#include<conio.h>

void main()
{

    int x = 10, y = 15, temp;
    temp = x;
    x = y;
    y = temp;
    printf("x = %d and y = %d", x, y);
    getch();
}