Computer Science, asked by vandanaseth62, 2 months ago

write a program to input two numbers. Interchange interchange the numbers using third variable​

Answers

Answered by totalgamer45
3

Answer:

Assign var1 value to a temp variable: temp = var1.

Assign var2 value to var1: var1 = var2.

Assign temp value to var2: var2 = temp.

Answered by Anonymous
1

Answer:

int main()

{

int var1, var2, temp;

printf("Enter two integersn");

scanf("%d%d", &var1, &var2);

printf("Before SwappingnFirst variable = %dnSecond variable = %dn", var1, var2);

temp = var1;

var1 = var2;

var2 = temp;

printf("After SwappingnFirst variable = %dnSecond variable = %dn", var1, var2);

return 0;

}

Explanation:

hope it helps

please mark me brainliest

Similar questions