1. Course
  2. Data types B
  3. Conditional operator and boolean

Conditional operator and boolean


Last updated: 8/23/2020 Difficulty: Easy

Create a C# program that uses the conditional operator to assign value to a boolean variable. You must assign true if two numbers entered by the user (x, y) are even and false if any of them is odd.

Finally, it shows the value of the variable on the screen.

Input

2
2

Output

True

Solution

Data types B

3 / 7

Android App


Practice C# anywhere with the free app for Android devices.

Android App

Exercises C# by difficulty


Learn C# at your own pace, the exercises are ordered by difficulty.

Make a donation


Your donations support our work and contribute to the maintenance of the app.

Advertising