Computer Science, asked by nkumar7383, 2 months ago

write a program to determine whether an input number is an odd number​

Answers

Answered by nantuohe
1

Answer:

Enter an integer: -7 -7 is odd. In the program, the integer entered by the user is stored in the variable num . Then, whether num is perfectly divisible by 2 or not is checked using the modulus % operator. If the number is perfectly divisible by 2 , test expression number%2 == 0 evaluates to 1 (true).

Explanation:

HOPE THIS ANSWER HELPS YOU ...

Answered by Anonymous
4

Answer:

Enter an integer: -7 -7 is odd. In the program, the integer entered by the user is stored in the variable num . Then, whether num is perfectly divisible by 2 or not is checked using the modulus % operator. If the number is perfectly divisible by 2 , test expression number%2 == 0 evaluates to 1 (true).

Similar questions