-
Notifications
You must be signed in to change notification settings - Fork 16
Completed cfraction #48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
| } | ||
| x += '.'; | ||
| siz += 1; | ||
| return siz - 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return siz++;
| return siz - 1; | ||
| } | ||
|
|
||
| int if_null(std::string x, int left, int right) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Лучше назвать is_null, а возвращаемое значение заменить на bool. тогда не нужно будет выполнять лишние значения.
| std::cin >> x >> y; | ||
|
|
||
| if (x[0] != '-' && y[0] == '-') std::cout << '>'; | ||
| else if (x[0] == '-' && y[0] != '-') std::cout << '<'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Тело else всегда должено быть в скобках
| else if (x[0] != '-' && y[0] != '-') std::cout << compare(x, y); | ||
| else { | ||
| char byabs = compare(x, y); | ||
| if (byabs == '>') std::cout << '<'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
std::cout << byabs;
А что значит byabs?
|
|
||
| int index_dot(const char* x) { | ||
| int i; | ||
| for(i = 0; x[i]; i++) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Тело цикла всега в фигурных скобках
Completed cfraction + переделанные ветки