Vẽ chữ X

View as PDF

Time limit: 1.0s , Memory limit: 123M , Points: 1 (partial)

Vẽ chữ X như ví dụ minh họa với kích thước n = 2, n = 3.

Input

Dòng duy nhất chứa số nguyên n thỏa 1 \le n \le 12.

Output

In ra theo yêu cầu, tham khảo ví dụ mẫu.

Samples

Sample Input 1
2
Sample Output 1
* . . . *
. * . * .
. . * . .
. * . * .
* . . . *
Sample Input 2
3
Sample Output 2
* . . . . . *
. * . . . * .
. . * . * . .
. . . * . . .
. . * . * . .
. * . . . * .
* . . . . . *

Comments


  • -1
    24T1020536  commented on Oct. 24, 2025, 6:46 a.m.

    include<bits/stdc++.h>

    using namespace std; int main() { int n ; cin >> n; int size=2n+1; for(int i = 0;i < size;i++) { for(int j = 0;j < size;j++) { cout<<((j == i || j == size - 1 - i)? "":"." )<<"\t"; } cout<<"\n"; } }


    • -1
      25t1020295  commented on Oct. 20, 2025, 8:23 a.m.

      xin loi giai a


      • -1
        24t1020233  commented on Oct. 16, 2024, 1:06 a.m.

        Quy luật bài này là sao vậy ạ, em không hiểu T_T


          • -1
            24t1020233  commented on Oct. 16, 2024, 1:52 a.m.

            Mình làm được rồi


              • -1
                Bright  commented on Oct. 17, 2024, 4:46 a.m.

                bạn làm bài này như nào vậy chỉ tui với