Created
November 30, 2014 15:52
-
-
Save magmel48/839a64e15a231df8a49e to your computer and use it in GitHub Desktop.
segment
This file contains 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
float[] segment() { | |
float min = 0.0f; | |
float max = 0.0f; | |
float num = 0.0f; | |
do { | |
cin >> num; | |
if (num > max) max = num; | |
if (num < min) min = num; | |
} while (abs(num) > FLT_EPSILON); | |
return new float[] { min, max }; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment