-
Notifications
You must be signed in to change notification settings - Fork 34
Number app #18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Number app #18
Conversation
//Set color and then reset it after the error | ||
Console.ForegroundColor = ConsoleColor.Red; | ||
Console.Write(" ERROR: FORMAT EXCEPTION"); | ||
Console.ResetColor(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Roligt med färger!
Console.WriteLine(); | ||
} | ||
|
||
Console.WriteLine("Total: " + inputTotal + " Average: " + Math.Round(inputTotal / (double)inputLength, 3)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Saknar max och minvärde.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, missade att man skulle ha det också. Ska jag uppdatera med det eller ska jag låta det vara för den här gången?
Jag hade troligen gjort nånting i stil med
if(maxValue < numberParse) { maxValue = numberParse; }
i TryParse if-satsen på rad 25 (och med ett minValue).
Ser att jag hade nån onödig convert to double där också.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ja, du fattar principen, behövs ej. Jag hade skrivit numberParse > maxValue (samma sak, men min hjärna läser det lättare).
Exercise in numbers. It currently doesn't edit out faulty entries, but instead ignores them.