Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Can you solve the questions ...oo STC 1:58 PM. (2 AASFSIBA%D l.The decision tabl

ID: 3841805 • Letter: C

Question


Can you solve the questions ...oo STC 1:58 PM. (2 AASFSIBA%D l.The decision table below shows fines imposed for speeding violations. Write a code segment that assigns the correct fine to type float variable fine based on the value of type int variable speed. Speed (mph) Fine 65 or less 66-70 15.00 71-75 30.00 76-80 75.00 100.00 over 80 2. The intention of the following program fragment is to display the positive integers from 1 through n, but it doesn't work. Correct the while statement so the fragment achieves the desired effect. while (i n) printf("%d n: printf("In"

Explanation / Answer

1)

2)

i=1;

while(i<=1) {

printf("%d",n);

i=i+1;

printf(" ");

}

3)

product=1;

for(next=1;next<=m;next++)

{

product=product*next;

}

4)

switch(digit)

{

case 0: { value=3; break; }

case 1:{ value=3;break; }

case 2:{ value=6;break;}

case 3:{ value=9;break; }

}

5) we will get an error like

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote