Write a program perform swaping between three number
Answers
Answered by
0
Answer:
Program perform swapping between three number:
Explanation:
#include<stdio.h>
#include<conio.h>
int main()
{
int a, b, c, temp;
printf("Enter a: ");
scanf("%d",&a);
printf("Enter b: ");
scanf("%d",&b);
printf("Enter c: ");
scanf("%d",&c);
printf("Before swapping \n");
printf("a: %d \n", a);
printf("b: %d \n", b);
printf("c: %d \n", c);
temp = a;
a = b;
b = c;
c= temp;
printf("After swapping \n");
printf("a: %d \n",a);
printf("b: %d \n", b);
printf("c: %d \n", c);
return 0;
}
Similar questions
English,
2 months ago
Science,
2 months ago
Hindi,
2 months ago
Math,
5 months ago
Social Sciences,
10 months ago
Computer Science,
10 months ago