Advertisement
dyamondz

Rectangles (1) - X26853

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