Program to input two numbers and print their values after interchange(Swap) using third value.

#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,c=0;
clrscr();
printf("Enter first number=");
scanf("%d",&a);
printf("Enter second number=");
scanf("%d",&b);
c=a;
a=b;
b=c;
printf(\nFirst number=%d",a);
printf("\nSecond number=%d",b);
getch();
}

OUTPUT



Note:- If any problem in this program please comment and never forget to share.

Comments

Popular posts from this blog

Write a program to input age of any person and check he is eligible for voting or not.

Write a program to input two digit number and check number is palindrome or not.

Write a program to input speed of Royal Enfield and check it's running at economic speed or not.