Answer the question
In order to leave comments, you need to log in
How to write a simple C++ program as close to assembler as possible?
It is necessary to write a program in C ++ that is as similar as possible to assembler code. How to make nested if-else look like it?
*sorry if the question is incorrect
Condition: if the three numbers are in ascending order, print 1, otherwise - 0.
int main() {
int res; //результат
int a = 5;
int b = 4;
int c = 9;
if (b < c) {
if (a < c) {
if (a < b) {
res = 1;
}
else {
res = 0;
}
}
else {
res = 0;
}
}
else {
res = 0;
}
cout << res << endl;
system("pause");
return 0;
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question