eolymp
bolt
Try our new interface for solving problems
Məsələlər

Şablon 4

dərc olunub 02.01.24 20:39:42

include <iostream>

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