Created
March 22, 2018 11:16
-
-
Save hansen033/c587b032bccd626b171ebc9f77aaf70d to your computer and use it in GitHub Desktop.
2018/3/22
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
int main() { | |
int a, b = 0; | |
cout << "你想要比較幾個數?"; | |
cin >> a; | |
int x[a]; | |
for ( int t = 0 ; t < a ; t ++ ){ | |
cin >> x[t]; | |
} | |
for ( int t = 0 ; t < a ; t ++ ){ | |
if ( x[t] > b ){ | |
b = x[t]; | |
} | |
} | |
cout << b; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment