Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions more-question/homework.md
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,7 @@ Telegram ID: <a href="https://t.me/wolf2022">@wolf2022</a>
مثلث خیام (ساده)<br>
<a href='https://quera.org/problemset/595'>لینک سوال +</a>
</td>
<td>unsolve</td>
</tr>
<td><a href='/src/2016/'>solved</a></td> </tr>
<tr>
<td>17</td>
<td>2017</td>
Expand Down
19 changes: 19 additions & 0 deletions src/2016/4021277334/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#include <iostream>
using namespace std;
void khayyam(int n) {
for (int i = 0; i < n; i++) {
int coef = 1;
for (int j = 0; j <= i; j++) {
if (j > 0)
coef = coef * (i - j + 1) / j;
cout <<coef<< " ";
}
cout <<endl;
}
}
int main() {
int numbers;
cin >> numbers;
khayyam (numbers);
return 0;
}
12 changes: 7 additions & 5 deletions src/2016/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,17 @@ or use the answers below.
<th>c++</th>
<th>python</th>
</tr>
<!-- <tr>
<td>NUM_OF_ANSWER</td>
<tr>
<td>1</td>
<td>
<a href='YOUR_GITHUB_USERNAME'>NAME_AND_FAMILY</a>
<a href='https://github.com/Mohamad-do-b84/'>mohamad rahbar</a>
</td>
<td>unsolved</td>
<td>
<a href='./4021277334/main.cpp'>solved</a>
</td>
<td>unsolved</td>
<td>unsolved</td>
</tr> -->
</tr>
<table>
<!-- <td>
<a href='./STUDENT_ID/FILE_NAME'>solved</a>
Expand Down