Write a program to swap two numbers.
Answers
Answered by
1
MATE THE ANSWER TO YOUR QUESTION IS THE ABOVE PICTURE HOPE YOU GOT IT MARK AS BRAINLIEST
Attachments:
Answered by
1
Program to swap two numbers using C Language
Explanation :
#include<conio.h>
#include<stdio.h>
void main()
{
int a,b,temp;
printf("Enter the value of a:");
scanf("%d",&a);
printf("Enter the value of b:");
scanf("%d",&b);
temp=a;
a=b;
b=temp;
printf("The values after the swap is a=%d,b=%d",a,b);
getch();
}
output :
Enter the value of a:5
Enter the value of b:2
the values after the swap is a=2,b=5
TO KNOW MORE ABOUT:
1.Write a program to swap two numbers with the help of third variablebrainly.in/question/10183132
2.Write a program in Java to swap two numbers
brainly.in/question/13323835
Similar questions
Political Science,
5 months ago
English,
5 months ago
Science,
5 months ago
Computer Science,
10 months ago
Computer Science,
10 months ago
Math,
1 year ago
Chemistry,
1 year ago