Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Write a program that allocates array of 20 integers and initializes each element by its index multiplied by 5.
- //Print the obtained array on the console.
- using System;
- class Program
- {
- static void Main()
- {
- int[] array = new int[20];
- for (int i = 0; i < array.Length; i++)
- {
- Console.WriteLine("array [{0}] = {1}",i,i*5);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment