Program to update even number into its upper nearest odd number

Program to update even number into its upper nearest odd number and similarly convert the odd number into its lower even number using if-else statement.

Hint1: 4 is even and its nearest upper number is 5

Hint2: 9 is odd and its nearest lower number is 8

Flowchart of the Program to convert an even number into an odd number

Flowchart of the Program to convert an even number into an odd number

C++ Program to convert an even number into an odd number

Output

enter number

4

Even number into its nearest odd

5

SFT (Shamil’s Flow Table )

Are you interested to Read about SFT(Shamil’s Flow Table)?

Explanation of the Program to update an even number into an odd number

Latest posts by Prof. Fazal Rehman Shamil (see all)

Buy advertisement space on T4Tutorials

For more details email [email protected]