Guest User

Programa que recebe os valores de uma matriz 3x3 CORRIGIDO

a guest
Jan 29th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.39 KB | None | 0 0
  1. //Programa que recebe os valores de uma matriz 3x3
  2. #include <iostream>
  3. #include <conio.h>
  4.  
  5. using namespace std;
  6.  
  7. int main(){
  8.     int Matriz[3][3], linhas, colunas;
  9.     linhas = 3;
  10.     colunas = 3;
  11.     for(int i=0;i<linhas;i++){
  12.     for (int j=0;j<colunas;j++){
  13.         cout<<"Digite um número: ["<<i<<"]["<<j<<"]";
  14.         cin>>Matriz[i][j];
  15.     }
  16. }
  17.     getch();
  18.     return 0;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment