Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - C language homework: enter an integer, if it is a multiple of 3, add 1, if it is a multiple of 2, subtract 1, and then multiply it by 5 to print out the original number and the result.
C language homework: enter an integer, if it is a multiple of 3, add 1, if it is a multiple of 2, subtract 1, and then multiply it by 5 to print out the original number and the result.
I saw at a glance that z=0||n=0.

The logical operator is equal to = =, and the thinking is a bit confusing, so it seems meaningless to switch.

If (z==0)

printf("%d,%d\n ",x,(x+ 1)* 5);

If (n==0)

printf("%d,%d\n ",x,(x- 1)* 5);

other

Printf ("The number entered does not meet the requirements");