Advertisement
Josif_tepe

Untitled

Mar 26th, 2021
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.03 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     int mat[3][9];
  8.     mat[0][0] = 1;
  9.     mat[0][1] = 2;
  10.     mat[0][2] = 6;
  11.     mat[0][3] = 9;
  12.     mat[0][4] = 4;
  13.     mat[0][5] = 3;
  14.     mat[0][6] = 15;
  15.     mat[0][7] = 10;
  16.     mat[0][8] = 50;
  17.     for(int i = 0; i < 9; i += 1) {
  18.         if(mat[0][i] == 1) {
  19.             cout << "cobblestone ";
  20.         }
  21.         else if(mat[0][i] == 2) {
  22.             cout << "obsidian ";
  23.         }
  24.         else if(mat[0][i] == 6) {
  25.             cout << "bricks ";
  26.         }
  27.         else if(mat[0][i] == 9) {
  28.             cout << "bones ";
  29.         }
  30.         else if(mat[0][i] == 4) {
  31.             cout << "wither skulls ";
  32.         }
  33.         else if(mat[0][i] == 3) {
  34.             cout << "nether wart ";
  35.         }
  36.         else if(mat[0][i] == 15) {
  37.             cout << "diamonds ";
  38.         }
  39.         else if(mat[0][i] == 10) {
  40.             cout << "emerald ";
  41.         }
  42.         else if(mat[0][i] == 50) {
  43.             cout << "golden apple ";
  44.         }
  45.     }
  46.     return 0;
  47. }
  48.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement