andreykata

ArraysExercise01

Jan 12th, 2013
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.48 KB | None | 0 0
  1. using System;
  2.     class Exercise01
  3.     {
  4.         static void Main(string[] args)
  5.         {
  6.             int[] array = new int[20];
  7.             int lenght = array.Length;
  8.             int[] multipliedByFive = new int[lenght];
  9.             for (int i = 0; i < 20; i++)
  10.             {
  11.                 array[i] = i;
  12.                 multipliedByFive[i] = array[i] * 5;
  13.                 Console.WriteLine("multipliedByFive[{0}] = {1}", i, multipliedByFive[i]);
  14.             }
  15.         }
  16.     }
Advertisement
Add Comment
Please, Sign In to add comment