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

I am working on first exercise from textbook, \"Programming Languages for MIS\"

ID: 3708170 • Letter: I

Question

I am working on first exercise from textbook, "Programming Languages for MIS" and I read chapters and watched videos and don't know where to start. I have to fill in the blanks and don't know where to get answers or how to figure it out. Chapter 2, page 49-50, question 1. Then I have to do a diagram. Where do I get these answers or figure them out?

1. Read the following C program and complete it by filling in the blanks:
1 #______________<iostream>
2 using namespace std;
3 ___________ CommissionCalculation(_____);
4 void main()
5 ___________
6 ____________ i;
7 double sales;
8 double ______________________;
9 for (i=1______ i<=3 _____ i++)
10 {
50 Programming Languages for MIS?
11 sales=10*i;
12 CommissionRate=CommissionCalculation(sales);
13 printf("The commission rate for sales of %2.2f is : __2.2f. ",
14 sales, CommissionRate);
15 ________
16 }
17 double CommissionCalculation(double S)
18 {
19 __________ Commission;
20 if (S<=15) {Commission=0.01; };
21 if ((S>15) && (S<=25) )__________ {Commission=0.02; };
22 if (S>25) {Commission=0.01; };
23 ___________(Commission);
24 ________

Explanation / Answer

#include <iostream>
using namespace std;
double CommissionCalculation(double S);
void main()
{
int i;
double sales;
double CommissionRate;
for (i=1;i<=3;i++)
{
Programming Languages for MIS
sales=10*i;
CommissionRate=CommissionCalculation(sales);
printf("The commission rate for sales of %2.2f is : $%2.2f. ",sales, CommissionRate);
return;
}

double CommissionCalculation(double S)
{
double Commission;
if (S<=15) {Commission=0.01; };
if ((S>15) && (S<=25)) {Commission=0.02; };
if (S>25) {Commission=0.01; };
return (Commission);
}

**Comment for any further queries.

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