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 ConsoleApplication58
- {
- class Program
- {
- static void Main(string[] args)
- {
- int[] b = new int[10];
- int count = 0;
- int[] a = new int[10];
- for(int i = 0; i < a.Length; i++)
- {
- Console.WriteLine("A is : ");
- a[i] = int.Parse(Console.ReadLine());
- if (a[i] < 0)
- {
- count++;
- b[i] = a[i];
- }
- Console.WriteLine( " " );
- }
- for (int i = count + 1; i < a.Length ; i++)
- {
- if (a[i] > 0)
- b[i] = a[i];
- }
- for(int i = 0 ; i < b.Length; i++)
- {
- Console.Write(" B is : " + b[i]);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement