pegasus975

as

Jun 21st, 2014
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.89 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace Viernes
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.            
  14.             //SpaceCar sp = new SpaceCar();
  15.  
  16.             int[,] marte = new int[5, 5];
  17.             //preenchendo a matriz
  18.             for (int i = 4; i >= 0; i--)
  19.             {
  20.                 for (int j = 4; j >= 0; j--)
  21.                 {
  22.                     marte[i,j] = i + j;
  23.                 }
  24.             }
  25.             //mostrar matriz
  26.             for (int i = 4; i >= 0; i--)
  27.             {
  28.                 for (int j = 4; j >= 0; j--)
  29.                 {
  30.                     Console.Write(" "+ marte[i,j]);
  31.                 }
  32.                 Console.WriteLine("\n");
  33.  
  34.             }
  35.  
  36.  
  37.            
  38.             Console.ReadKey();
  39.         }
  40.     }
  41. }
Advertisement
Add Comment
Please, Sign In to add comment