You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1.5 KiB
1.5 KiB
Hints
General
1. Calculate the production rate per second
- Determining the success rate can be done through a conditional statement.
- C# allows for multiplication to be applied to two different number types (such as an
int
and adouble
). It will automatically return the "largest" data type. - Numbers can be compared using the built-in comparison- and equality operators.
2. Calculate the number of working items produced per second
- Whereas an
int
can be automatically converted to adouble
, the reverse does not hold. The reason for this is that anint
has less precision than adouble
so rounding has to be applied, also the range of numbers anint
can represent is smaller than adouble
. To force this conversion, one can either use one of theConvert
class' methods or cast to an int.