Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- /*
- * 1. 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.
- */
- class ArrayOf20int
- {
- static void Main()
- {
- int[] arr = new int[20];
- for (int i = 0; i < arr.Length; i++)
- {
- arr[i] = i * 5;
- Console.WriteLine(arr[i]);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement