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 ConsoleApp3
- {
- class Program
- {
- static void Main(string[] args)
- {
- int[] a = new int[10];
- int[] b = new int[10];
- int c, d, j = 0;
- for (c = 0; c < 10; c++)
- {
- d = Convert.ToInt32(Console.ReadLine());
- if (d == 0)
- {
- break;
- }
- else
- {
- if (d % 2 == 0)
- {
- a[c] = d;
- }
- else
- b[c] = d;
- }
- }
- Console.WriteLine("\n\n");
- for (c = 0; c < a.Length; c++)
- {
- if (a[c] != 0)
- Console.WriteLine("{0},", a[c]);
- }
- Console.WriteLine("\n\n");
- for (c = 0; c < b.Length; c++)
- {
- if (b[c] != 0)
- Console.WriteLine("{0},", b[c]);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment