Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - How to assign values to variables A and B in C language, the assignment range is certain.
How to assign values to variables A and B in C language, the assignment range is certain.
//Define the types of variables A and B first.

//For example

int a,b; //define a and b as int, that is, integers ranging from -32768 to 32767.

//Then you can assign a value.

//For example

a= 1,b = 2; //Here = is not an equal sign, but an assignment number, and the equal sign is = =

//You can also assign values directly when defining.

int a= 1,b = 2;

//enter yes.

Scanf("%d%d ",&i, & b); //int type uses %d long type uses %ld, and the one upstairs is missing &; address mark

//The assignment range is determined according to the defined type, depending on your needs.