In the example, the user is prompted to enter values for three numbers a, b and c. It then checks for the test condition (a>b). If this condition is true then it checks for the test condition (a>c) using the if-else block contained in it. If the condition (a>c) evaluates to true then the message a is the Greatest is displayed otherwise the message c is the Greatest is displayed. [Read more…] about Write A C++ Program To Find Greatest Number Among Three Integer Numbers.
Write A C++ Program To Verify is A Number is Divisible By 3 & 5 Or Not.
Write a C++ Program to Find out Whether It is An Odd Number Or Even Number. Any Integer is Input through the Keyboard.
This if-else statement prints whether an integer number n is odd or even. A number is even if it is divisible by 2. Thus, if expression n % 2 == 0 is true, number n is even; otherwise it is odd. Alternatively, we can write this if statement as follows: [Read more…] about Write a C++ Program to Find out Whether It is An Odd Number Or Even Number. Any Integer is Input through the Keyboard.