Advertisement
dyamondz

Rectangles (2) - X59091

Oct 12th, 2017
250
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.33 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main(){
  5.     int n, m, conta;
  6.     bool esPrimer=true;
  7.     while(cin>>n>>m){
  8.         conta=9;
  9.         if(esPrimer==false) cout<<endl;
  10.         else esPrimer=false;
  11.         for(int i=0;i<n;++i){
  12.             for(int j=0;j<m;++j){
  13.                 cout<<conta;
  14.                 --conta;
  15.                 if(conta==-1) conta=9;
  16.             }
  17.             cout<<endl;
  18.         }
  19.     }  
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement