top of page
#include <bits/stdc++.h>
using namespace std;
void dreptunghi(int n, int m)
{
int i, j;
for (i = 1; i <= n; i++)
{
for (j = 1; j <= m; j++)
{
if (i == 1 || i == n ||
j == 1 || j == m)
cout << "*";
else
cout << " ";
}
cout << endl;
}
}
int main()
{
int inaltime,latime;
cout<<"Inaltime este "; cin>>inaltime;
cout<<"Latime este "; cin>>latime;
dreptunghi(inaltime,latime);
return 0;
}
bottom of page