Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Basics
- {
- internal class Program
- {
- private static void Main(string[] args)
- {
- int[] numbers = new int[10];
- for (int i = 0; i < 10; i++)
- {
- if (i%2==0)
- {
- numbers[i] = i + 2;
- }
- else
- {
- numbers[i] = -(i + 2);
- }
- }
- string result = string.Join(",", numbers);
- Console.WriteLine(result);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement