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 ConsoleApp10
- {
- class Program
- {
- static int[] Input()
- {
- const int len= 5;
- int[] massive = new int[len];
- for(int i=0;i<massive.Length;i++)
- {
- Console.Write("Введите " + i + " число: ");
- massive[i] = int.Parse(Console.ReadLine());
- }
- return massive;
- }
- static void Output(int[] massive)
- {
- for(int i=0;i<massive.Length;i++)
- {
- Console.WriteLine(i + " значение=" + massive[i]);
- }
- }
- static void Main(string[] args)
- {
- int[] massive=Input();
- Output(massive);
- }
- }
- }
Add Comment
Please, Sign In to add comment