e-olymp
favorite We need a little bit of your help to keep things running, click on this banner to learn more
Problems

*Frame 3

published at 1/29/20, 5:08:20 pm

include <iostream>

using namespace std; int main () { long long n; cin>>n; n<=100; if(n==1) { cout<<"*"; } else if (n!=10) { for(long long i=0;i<n;i++) { cout<<"*"; } for(long long i=0;i<n-2;i++){ cout<<endl; cout<<"*"; for(long long i=0;i<n-2;i++){ cout<<" "; } cout<<"*"; } cout<<endl;

for(long long i=0;i<n;i++){
    cout<<"*";

} } }

published at 2/22/20, 1:14:21 pm

include <iostream>

using namespace std; int main() { int m; cin >> m; for (int i=1;i<=m;i++) { for (int j=1;j<=m;j++) { if (i == 1 || i == m) { cout<<"*"; } else if (j>1 && j<m) { cout << " "; } else { cout << "*"; } } cout << endl; }

return 0;

}