بيان المشكلة
Write a program that reads an integer N and prints a diamond pattern of stars.
N represents the number of rows in the upper half of the diamond (including the middle row).
DEMO-C-32 • Programming in C
Write a program that reads an integer N and prints a diamond pattern of stars.
N represents the number of rows in the upper half of the diamond (including the middle row).
A single integer N (1 <= N <= 20).
A diamond pattern of stars.
Submit runs every public testcase in this browser. Results and code never leave this device.
3
* *** ***** *** *
5
*
***
*****
*******
*********
*******
*****
***
*1
*
2
* *** *
C, C++, Java, and Python run locally in a browser VM. No worker or visualizer is used.
/workspace/question