Welcome to Tech Support Forum home to more then 136,000 problems solved. Issues have included: Spyware, Malware, Virus Issues, Windows, Microsoft, Linux, Networking, Security, Hardware, and Gaming Getting your problem solved is as easy as:
1. Registering for a free account
2. Asking your question
3. Receiving an answer

Registered members:
* Get free support
* Communicate privately with other members (PM).
* Removal of this message
* See fewer ads.
* And much more..

 



Want to know how to post a question? click here Having problems with spyware and pop-ups? First Steps
Go Back   Tech Support Forum > The IT Pro > Programming
User Name
Password
Site Map Register Donate Rules Blogs Mark Forums Read


Programming A discussion forum for programs and programming used in tech-related businesses.

Closed Thread
 
LinkBack Thread Tools
Old 10-17-2009, 12:44 PM   #1 (permalink)
Registered User
 
Join Date: Oct 2009
Posts: 1
OS: Windows Vista


C++ Exercise

Task for Exercise 1
Suppose that a float variable called score contains the overall points earned for this course. The following set of cascaded if-then-else pseudocode statements determines your final grade.

If (score >= 85) then
Set grade = ‘A’ Else
If (score >= 75) then
Set grade = ‘B’
Else
If (score >= 65) then
Set grade = ‘C’
Else
If (score >= 55) then
Set grade = ‘D’
Else
Set grade = ‘F’
End if // score >= 55
End if // score >= 65
End if // score >= 75
End if // score >= 85


Your assignment is to convert this pseudocode into a C++ program. Use the following template for your program and remember to maintain all the blank lines, spaces, and general alignment. Then replace the areas that have been highlighted in yellow with your code. Do not change any of the other code.

Code Template for Exercise 1
/****************************************************/
/* File: name of your file with the source code */
/* */
/* Created by: give your name */
/* Date: give the date */
/* */
/* Program to determine course grade */
/* */
/* Inputs: (keyboard) */
/* 1. Float - weighted total points (<= 100) */
/* */
/* Output: */
/* letter grade using pseudocode grading policy */
/* */
/* Algorithm: Comparisons using if-then-else */
/* */
/****************************************************/
#include <iostream>

using namespace std ;

int main()
{

Declare score and grade appropriately as variables.

// read in total score

cout << endl ;
cout << "Enter total score (float, must be <= 100) : " ;
cin >> score ;
Write C++ if-then-else statements to determine course grade,
using the grading policy stated in the pseudocode.


// display the result

cout << endl ;
cout << "Your grade for CMIS 102 is: " << grade << endl ;

return (0); // terminate with success
}

Test Plan for Exercise 1
Test your code with the following numbers:

85.0, 65.0001, 54.99999, –33.3, 100, 90, 150
quiet1der is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Important Information
Join the #1 Tech Support Forum Today - It's Totally Free!

TechSupportForum.com is a leading support website for your computer needs. We offer free, friendly and personalized computer support. Why pay to have your computer fixed when you can do it for free.

Join TechSupportforum.com Today - Click Here

Old 10-17-2009, 02:05 PM   #2 (permalink)
Design Team Member
 
jamiemac2005's Avatar
 
Join Date: Jul 2007
Location: Coventry, UK
Posts: 1,879
OS: Vista, various linux distros


Re: C++ Exercise

Hey, please read the forum rules:

Quote:
Originally Posted by The Rules
* You may not ask for assistance with homework assignments, projects or book reports for school college or university
We will not do this exercise for you. I suggest going here: http://www.cprogramming.com and learning to write C++ so that you actually get something out of your course.

Cheers,
Jamey
__________________

Myspace
jamiemac2005 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Old 10-17-2009, 03:05 PM   #3 (permalink)
Manager
 
shuuhen's Avatar
 
Join Date: Sep 2004
Location: Colorado
Posts: 986
OS: Mac OS 9.1, Mac OS X 10.5.8, WinXP Pro, FreeBSD 6.0, Gentoo Linux

My System

Re: C++ Exercise

As jamiemac2005 stated, we have specific rules about helping with homework. If you do not understand the assignment, I suggest you schedule a meeting with your instructor/TA for the course or attend office hours.

Thread closed. Please review the forum rules.
__________________


Has it been a few days since I replied to your thread? Don't panic! I'm a busy college student and may forget a post if I'm extra busy (or it might just take me a while to be able to do a decent reply). If you still need help and are awaiting my reply after a few days, PM me about it.

When posting what errors you get, please give the full message. It makes helping you much easier.

Last edited by shuuhen; 10-17-2009 at 03:07 PM.
shuuhen is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT -7. The time now is 09:54 AM.



Copyright 2001 - 2009, Tech Support Forum
Home Tips Plus | Outdoor Basecamp | Automotive Support Forum

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85