Submission
Status:
PPPPP
Subtask/Task Score:
100/100
Score: 100
User: tonkla
Problemset: กังหันสี่ทิศ
Language: cpp
Time: 0.004 second
Submitted On: 2026-09-28 21:26:46
#include <iostream>
using namespace std;
int main(){
int n;
char s;
cin>>n;
s=64+n;
for(int i =0;i<(n*2)-1;i++){
for(int j =0;j<(n*2)-1;j++){
if(i+j == (n*2)-2|| i==j){
cout<<s;
}
else{
cout<<" ";
}
}
if(i<n-1){
s-=1;
}
else{
s+=1;
}
cout<<" ";
for(int j =0;j<(n*2)-1;j++){
if(i+j == (n*2)-2|| i==j){
cout<<"*";
}
else{
cout<<" ";
}
}
cout<<"\n";
}
}