1. Course
  2. Flow controls C
  3. Conditional operator nested

Conditional operator nested


Last updated: 8/23/2020 Difficulty: Intermediate

Create a C# program that asks the user for two integers (a, b) and check how many of them are positive.

Use a conditional operator nested in C#.

Input

3
2

Output

2

Solution

Flow controls C

8 / 8

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.

Advertising