Angga_Wahyu

C++ Program to print Square

Oct 16th, 2019
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.30 KB | None | 0 0
  1. #include<iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6.     int baris,kolom;
  7.    
  8.     cout<<"Masukkan Baris : ";
  9.     cin>>baris;
  10.     cout<<"Masukkan Kolom : ";
  11.     cin>>kolom;
  12.    
  13.     cout<<"Hasil\n";
  14.    
  15.     for(int i=1; i <= baris; i++){
  16.         for(int j=1; j <= kolom; j++){
  17.         cout<<"*";
  18.         }
  19.     cout<<endl;
  20.     }
  21.     return 0;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment