Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- double min = 0;
- double max = 0;
- for (int i = 0; i < nums; i++)
- {
- double currNum = double.Parse(Console.ReadLine());
- if (i == 0)
- {
- min = currNum;
- max = currNum;
- }
- else
- {
- if (currNum > max)
- {
- max = currNum;
- }
- if (currNum < min)
- {
- min = currNum;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement