arrow_forward همه ارسال‌ها

جزئیات ارسال کد#330

verified
وضعیت داوری نهایی: پذیرفته شد
terminal
زبان برنامه‌نویسی: C++
schedule
ارسال‌کننده و زمان:
Armin Fattahpuor (۲ سال پیش)
descriptionsolution.cpp ۲۷ خط • ۲۵۹ بایت
1#include <iostream>
2
3using namespace std;
4
5int main()
6{
7 int n; cin >> n;
8 int x=0;
9
10 int i = 0;
11 while (i < n)
12 {
13 int a=n-x;
14 while (a > 0)
15 {
16 cout << "*";
17 a=a-1;
18 }
19 cout <<"\n";
20 x++;
21 i++;
22 }
23
24
25
26 return 0;
27}
کد ارسال‌شده برای داوری خودکار هاتکدز UTF-8