Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - (C language) Declare two integer variables in the program, assign values to them, and then exchange the values of the two variables (temporary variables can be used).
(C language) Declare two integer variables in the program, assign values to them, and then exchange the values of the two variables (temporary variables can be used).
hello

Mark c answers your question.

# include & ltstdio.h & gt

int main()

{

int a,b,c;

Printf ("Please enter two integer variables to be exchanged: \ n");

Scanf("%d%d ",&i, & b);

c = a;

a = b;

b = a;

Printf ("The two variables after exchange are %d, %d\n", a, b);

Returns 0;

}

You can ask if you don't understand. Please don't accept people who plagiarize my answers. Thank you.

I hope I can help you, and I hope it is a satisfactory answer.