Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Nov 29th, 2007, 7:16 PM   #1
The_Professor
Newbie
 
Join Date: Nov 2007
Posts: 6
Rep Power: 0 The_Professor is on a distinguished road
Grading Scale

Ok I am looking at a C++ projects right now, but I want to try and do something in vb, due to thats what my laptop I bought off my son has on it. I want to create a grading scale, but have no clue about vb. I have my grading scale here and want to go by these guidlines in C++ as closely as possible. I need to create a program with 2 arrays and at most 1 if statement. 0-299 = F, 300-349 = D, 350-399 = C.. and so on. I want to enter the number grade in a text box and have the letter grade shown. Please help or get me started, I would like to have this done so I can give my students their final grade within the next few days.
The_Professor is offline   Reply With Quote
Old Nov 29th, 2007, 7:25 PM   #2
The_Professor
Newbie
 
Join Date: Nov 2007
Posts: 6
Rep Power: 0 The_Professor is on a distinguished road
Re: Grading Scale

If this is not possible by these guidelines what should I do?
The_Professor is offline   Reply With Quote
Old Nov 29th, 2007, 7:30 PM   #3
Wizard1988
Professional Programmer
 
Wizard1988's Avatar
 
Join Date: Oct 2005
Location: Chitown
Posts: 414
Rep Power: 3 Wizard1988 is on a distinguished road
Send a message via AIM to Wizard1988
Re: Grading Scale

Umm use a calculator?? Other than following a tutorial http://www.functionx.com/cpp/index.htm
__________________
JG-Webdesign
Wizard1988 is offline   Reply With Quote
Old Nov 29th, 2007, 8:01 PM   #4
Sane
Programming Guru
 
Sane's Avatar
 
Join Date: Apr 2005
Posts: 1,787
Rep Power: 5 Sane will become famous soon enough
Re: Grading Scale

Let me guess. You're a student who hasn't done their homework, so you're pretending to be a teacher to trick us into to doing your homework for you? Fat chance Tommy. Either way, we're not a programming service. Read the rules.

Show us an attempt at your homework if you want another shot at getting help.
Sane is offline   Reply With Quote
Old Nov 29th, 2007, 8:49 PM   #5
Ancient Dragon
PFO God In Training
 
Ancient Dragon's Avatar
 
Join Date: Jun 2005
Location: near St Louis, MO. (USA)
Posts: 489
Rep Power: 4 Ancient Dragon is on a distinguished road
Re: Grading Scale

Any college professor can do this program in c++ in about 15 minutes (or less), and I realize some newbe programmers may find it somewhat tough assignment.

First you need two arrays -- one that holds the letters and the other the maximum grade allowed for that letter. For example:
    string  letters[] = {"F","D","C","B","A"};
    int     grades[] = {299,399,499,599,699};

Now all you have to do is to (1) prompt for a grade, (2) get keyboard input, (3) loop through the arrays until the grade you entered is less than the grade in the grades array, and finally (4) display the letter grade or an error message that says the grade you entered was not in the array.

Do the program just one item at a time and before you know it you will have it completed. Make sure you compile and test your program after finishing each of the 4 steps shown above.

[edit]Oops! this is the VB board, not c++. Oh well, the same applies to VB except the arrays I posted have to be converted to VB syntax, which shouldn't be that difficult to do.[/edit]
Ancient Dragon is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
grading program Rsitapara C++ 8 Feb 27th, 2005 11:42 PM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 4:49 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC