Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace ConsoleApp6
- {
- class Program
- {
- static void Main(string[] args)
- {
- int[,] array = new int[6, 6];
- string s; int sum = 0; int sumAll = 0;
- for (int i = 0; i < 6; i++)
- {
- for (int j = 0; j < 6; j++)
- {
- array[i, j] = int.Parse(Console.ReadLine());
- }
- }
- Console.WriteLine();
- for (int i = 0; i < 6; i++)
- {
- s = "";
- for (int j = 0; j < 6; j++)
- {
- s += String.Format("{0,4}", array[i, j]);
- }
- Console.WriteLine(s);
- }
- for (int i = 0; i < 6; i++)
- {
- sum = 0;
- for (int j = 0; j < 6; j++)
- {
- if (array[i, j] % 2 == 1)
- {
- sum += array[i, j];
- Console.Write(array[i, j] + " ");
- }
- }
- Console.WriteLine(sum);
- sumAll += sum;
- }
- Console.WriteLine(sumAll);
- }
- }
- }
- /*
- 11
- 12
- 13
- 14
- 15
- 16
- 21
- 22
- 23
- 24
- 25
- 26
- 31
- 32
- 33
- 34
- 35
- 36
- 41
- 42
- 43
- 44
- 45
- 46
- 51
- 52
- 53
- 54
- 55
- 56
- 61
- 62
- 63
- 64
- 65
- 66
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement