Computer Science, asked by manoj5454, 5 months ago

Write a program perform swaping between three number

Answers

Answered by mad210202
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