Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - The rest of the C language programming
The rest of the C language programming
1。 The remainder sign is the% sign, which is called the modular operator. For example, 5%3 equals 2.

2。 leave out

3。 Print ("\ n30%% 7s% d, 30% 7), because the% symbol has a special meaning in the formatted string, so if you just want to display an ordinary.

If the% character is used, you need to type 2%%. Here, 30%%7 will become 30%7 when it is displayed on the screen. Remember the first one I said?

%d means that an integer needs to be displayed here, which is the result of 30%7 after comma.

So the final result displayed on the screen is: 30%7is2.

The remainder of 30 divided by 7 is 2.