954,506 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Array Assignment

Hey, I heard this site is very good.

I need help on my C++ assignment. I would appreciate if you guys help me. :rolleyes: My professor is not very good teaching this class. Attached please find some of the excercise he want us to do.

Array Assignments

1. Write a C++ program to calculate the test score for student.
a) Create a 10 questions (True False and multiple choice)
b) Store the answers in an array.
c) Compare student answers with correct answer from array.
d) Increment the counter for each correct answer and for wrong answer.

Your output should look like

Name of Student xxxxxxxxx
Correct Answers xx
Wrong Answers xx
Percent of correct Answer = xx%

2. Write a program to calculate commission report for EZ-Tech corporation. They have five sales people. Your program must ask input for 3 sales for each sales person. Add the sales for each sales person and calculate commission. Commission is given by using the following information

a) For first $1000.00 commission rate is 5%
b) For next $2500.00 commission rate is 7%
c) Over $2500.00 commission rate is 9%
Use array

Your output should look like

Commission Report

Name Sale1 Sale2 Sale3 Total Commission

Xxxxx xxxxx xxxx xxxx xxxxx xxxx


Total xxxx xxxx xxxxx xxxxx xxxx

sugpo
Newbie Poster
3 posts since Nov 2004
Reputation Points: 10
Solved Threads: 0
 

Okay, and what have you tried? We don't do homework for you, we help you with specific problems (when the specific problem isn't "I need you to do my homework").

Narue
Bad Cop
Administrator
15,460 posts since Sep 2004
Reputation Points: 6,464
Solved Threads: 1,401
 

I don't really understand C++, and I don't have nobody to help me. So far all I have is this:

# include

int main()
{

char studentName[20];
char question[];
int correctanswrs;
int wronganswers;
int cal_percentanswers;

cout<< " Enter Student's Name: " <>correctanswers;

cout<< " Wrong Answers: ";
cin>>wronganswers;

sugpo
Newbie Poster
3 posts since Nov 2004
Reputation Points: 10
Solved Threads: 0
 

If that's the extend of your C++ knowledge I wonder how you've come so far in your course to get an assigment like the one you posted.

Or have you been chased away from another site for once too often asking people to do your homework for you?

Every programming course I've ever taken had one or more books as required (or sometimes strongly suggested but take that as required) reading.
I suggest you read your courseware as it should help you along no small bit.

Then break up your assignment into discrete parts and solve each of those.
Then glue the pieces together.

jwenting
duckman
Team Colleague
8,392 posts since Nov 2004
Reputation Points: 1,662
Solved Threads: 337
 

Thanks, but I just find out myself how to do it.

sugpo
Newbie Poster
3 posts since Nov 2004
Reputation Points: 10
Solved Threads: 0
 

>but I just find out myself how to do it.
Good. Maybe you actually learned something.

Narue
Bad Cop
Administrator
15,460 posts since Sep 2004
Reputation Points: 6,464
Solved Threads: 1,401
 

but your paying all that money for someone to teach you are you not??

happyHour
Newbie Poster
12 posts since Dec 2004
Reputation Points: 10
Solved Threads: 0
 
but your paying all that money for someone to teach you are you not??

Most kids don't pay for school. Their parents do but don't pass on the bill, so the kid never knows the cost of their schooling.

jwenting
duckman
Team Colleague
8,392 posts since Nov 2004
Reputation Points: 1,662
Solved Threads: 337
 

From the description, the instructor does not expect any student to get all the answers right. The percentage has only two spaces for digits in "Percent of Correct Answer"

The instructor also doesn't understand english syntax, because "Percent of Correct Answer" does not mean anything close to what is intended. It's almost scramblish.

Real-tiner
Posting Whiz in Training
207 posts since Dec 2004
Reputation Points: 11
Solved Threads: 8
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You