Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- namespace ConsoleApp1
- {
- class Program
- {
- static void Main(string[] args)
- {
- Console.WriteLine("Vuvedi golemina na array:");
- int n = Convert.ToInt32(Console.ReadLine());
- double[] arr = new double[n];
- for (int i = 0; i < n; i++)
- {
- Console.WriteLine("Vuvedi chislo:");
- arr[i] = Convert.ToDouble(Console.ReadLine());
- }
- Console.WriteLine("Chisla na cheten index:");
- for (int i = 0; i < arr.Length; i++)
- {
- if (i % 2 == 0)
- {
- Console.WriteLine(arr[i]);
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement