Submission
Status:
-----
Subtask/Task Score:
0/100
Score: 0
User: Krispans
Problemset: กังหันสี่ทิศ
Language: cpp
Time: 0.003 second
Submitted On: 2026-09-27 11:23:04
#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';
}
}