Question 1 - Simple Conditions
Create a console application that accepts two integer from the user and then displays if the values are equal or not equal.
Question 2 - Equality and relational operators
Modify the above application so that application uses the following condition to display the outputs
Create a console application that accepts two integer from the user and then displays if the values are equal or not equal.
Question 2 - Equality and relational operators
Modify the above application so that application uses the following condition to display the outputs
- If the first value is equal to second value then the system displays "First value is equal to second value"
- If the first value is not equal to second value then the system displays "First value is not equal to second value"
- If the first value is greater than second value then the system displays "First value is greater than second value"
- If the first value is less than second value then the system displays "First value is less than second value"
- If the first value is greater or equal second value then the system displays "First value is greater than or equal to second value"
- If the first value is less than or equal to second value then the system displays "First value is less than or equal to second value"
Question 3 - Conditional operators
Modify the above application to check for the following conditions
Modify the above application to check for the following conditions
- If the first number is a even number then display "first number is an even number"
- If the second number is a even number then display "second number is an even number"
- if both numbers are even then display "Both Numbers are even"
- if both numbers are odd then display "Both Numbers are odd"
Comments
Post a Comment