Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Veronickka
- {
- class MainClass
- {
- public static void Main (string[] args)
- {
- double[] array = new double[6];
- int count = 0, t= 0;
- double s = 0;
- for(int i = 0;i<6;i++){
- double.TryParse(Console.ReadLine(),out array[i]);
- }
- for (int i = 0; i < 6; i++) {
- if (Math.Abs (array [i]) < 1) {
- count++;
- s += array [i];
- }
- if (array [i] == 0) {
- t++;
- }
- }
- Console.WriteLine (count+"\t"+s/count+"\t"+t);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment