ellapt

T.7.1.AllocateInitialize

Jan 15th, 2013
32
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. using System;
  2. class AllocateInitialize
  3. {
  4. static void Main()
  5. {
  6. int[] arr20 = new int[20];
  7. Console.WriteLine("Calculate and print an array of 20 numbers");
  8. for (int i = 0; i < 20; i++)
  9. {
  10. arr20[i] = 5 * i;
  11. Console.WriteLine("{0}\t{1}", i, arr20[i]);
  12. }
  13.  
  14. }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment