Professional Documents
Culture Documents
If the number of hours is less than 41, then the pay equals hours * rate, otherwise, the pay equals 40 * rate + overtime hours * rate*1.5
In English, and in C#
If if
In English, and in C#
If the number of hours is less than 41, if (hours<41)
In English, and in C#
If the number of hours is less than 41, then pay equals hours * rate if (hours<41) pay=hours*rate;
In English, and in C#
If the number of hours is less than 41, then pay equals hours * rate, otherwise, if (hours<41) pay=hours*rate; else
In English, and in C#
If the number of hours is less than 41, then pay equals hours * rate, otherwise, the pay equals 40 * rate + overtime hours * rate*1.5 if (hours<41) pay=hours*rate; else pay = 40*rate + overtime*rate*1.5;
IF THEN ELSE, in C#
if (hours<41) pay=hours*rate; else pay = 40*rate + overtime*rate*1.5; hours<41 is a Boolean expression A Boolean expression evaluates to either true or false. If it is true, then run the statement after it , else, run the statement after else
Loops
Loops
How many repetitions? Who decides the number of repetitions? User or Programmer?
Statement
OR
while (Boolean Expression)
{Statements}
Statement
count=0
count<Max
count++