1. Course
  2. Arrays
  3. Search positive and negative numbers

Search positive and negative numbers


Last updated: 8/23/2020 Difficulty: Intermediate

Create a C# program that asks the user for 10 real numbers and shows the arithmetic mean of the positive and negative numbers.

Input

3
-5
2
4
-3
1
8
-10
6
4

Output

Average numbers negatives is -6
Average numbers positives is 4

Solution

Arrays

4 / 11

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