Skip to content

2HwKobzystyiMaksym#41

Open
MaksymKobzystyi wants to merge 1 commit intomasterfrom
2HwKobzystiyMaksymElka
Open

2HwKobzystyiMaksym#41
MaksymKobzystyi wants to merge 1 commit intomasterfrom
2HwKobzystiyMaksymElka

Conversation

@MaksymKobzystyi
Copy link
Collaborator

No description provided.


int main() {
int h, d = 2;
cout << "\nEnter length of triangle's side: ";
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

непонял а при чем тут сообщение вычесление стороны триугольника?

using namespace std;

int main() {
int h, d = 2;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

а зачем вам тут d?

@@ -0,0 +1,22 @@
#include <iostream>
using namespace std;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

отвыкайте от использования всего пространства имен

cout << endl;
for (int i = 1; i <= h; i++) {
for (int j = 1; j < h * 2; j++) {
if (i <= h * 2 && i >= h - j + 1 && j <= i + h - 1)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

напишите коментарий выше что делает этот if

cout << "\nEnter length of triangle's side: ";
cin >> h;
cout << endl;
for (int i = 1; i <= h; i++) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

предложение вам давать переменным типа i и j более читабельные имена, т.к. контекст имено в вашем коде немного не понятен

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants