← Back to List

10995번: 별 찍기 - 20 ↗

Solutions

C++14
248 B | 248 chars
#include <iostream>
using namespace std;
int N;
int main()
{
    cin>>N;
    for(int x=0; x<N; x++)
    {
        for(int y=0; y<N; y++)
        {
            if(x%2==0) cout<<"* ";
            else cout<<" *";
        }
        cout<<endl;
    }
}