Kamis, 14 September 2023

PRAKTIKUM MEMBUAT MATRIKS SEDERHANA C++

#include <iostream>
using namespace std;
int main()
{
    int bil[2][3];

    for (int a=0;a<2;a++){
      for (int b=0;b<3;b++){
          cout << "Matriks " <<a<<","<<b<< " = ";
          cin >> bil[a][b];
      }
    }
    cout << "\n==============================================="
<< endl;
    cout << "Hasil yang dimasukkan, tampilannya adalah " <<
endl;
    cout << "=============================================" <<
endl;
    for (int a=0;a<2;a++){
        for(int b=0;b<3;b++){
            cout <<bil[a][b]<< " ";
        }cout << endl;
    }
}


hasil peraktikum 


 

Tidak ada komentar:

Posting Komentar

PRAKTIKUM MEMBUAT MATRIKS SEDERHANA C++

#include <iostream> using namespace std; int main() {     int bil[2][3];     for (int a=0;a<2;a++){       for (int b=0;b<3...