Advertisement
Razk2108

CUADRO

Sep 14th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.39 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstdlib>
  3. #include <ctime>
  4. #include <windows.h>
  5. #include <cmath>
  6. using namespace std;
  7.  
  8. void dibuja(int x,int y){
  9.     for(int f=1;f<=y;f++){
  10.         for(int c=1;c<=x;c++){
  11.             if(f==1||f==y||c==1||c==x){
  12.                 cout<<"*";
  13.             }
  14.             else
  15.             cout<<" ";
  16.         }
  17.             cout<<endl;    
  18.     }
  19. }
  20.  
  21. int main(){
  22.     int l,a;
  23.     cout<<"L:";cin>>l;
  24.     cout<<"A:";cin>>a;
  25.    
  26.     dibuja(l,a);
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement