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

  1. 3
  2. -5
  3. 2
  4. 4
  5. -3
  6. 1
  7. 8
  8. -10
  9. 6
  10. 4

Output

  1. Average numbers negatives is -6
  2. 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


CookieOwn and third party cookies to improve our services. If you go on surfing, we will consider you accepting its use.