Welcome to the forum. Be sure to read up on these:
PLEASE ALWAYS USE CODE TAGS (the <> formatting button) when posting code.
It makes it easier to read your code and also easier to respond to your post. http://www.cplusplus.com/articles/jEywvCM9/ http://www.cplusplus.com/articles/z13hAqkS/
Hint: You can edit your post, highlight your code and press the <> formatting button.
You can use the preview button at the bottom to see how it looks.
int main() {
int a, b, c;
cin >> a >> b >> c;
if (a >= b && a >= c) cout << a;
if (b >= a && b >= c) cout << b;
if (c >= b && c >= a) cout << c;
return 0;
}
int main() {
int a, b, c;
cin >> a >> b >> c;
if ((a >= b && a <= c) || (a >= c && a <= b)) cout << a;
if ((b >= a && b <= c) || (b >= c && b <= a)) cout << b;
if ((c >= b && c <= a) || (c >= a && c <= b)) cout << c;
return 0;
}
int main() {
int n;
cin >> n;
int a[n];
for (int i = 0; i < n; i++) {
cin >> a[i];
}
for (int i = n - 1; i >= 0; i--) {
cout << a[i]; (nếu cần thêm dấu " ")
}
return 0;
}