Hi everyone, well i need help. I've never done any programming ever and well i need help to finish an assignment. Here are the requirments for this code:
Assignment:
The charges for college tuition are $75 per credit hour or $950 per semester if full-time (12 or more credit hours). In addition, a student who is majoring in computer science (major code ‘C’) is assessed a $25 per semester laboratory fee; those majoring in other laboratory sciences (major code ‘O’) pay a $35 fee. Other majors, each with a unique major code, pay no laboratory fee. Out-of-state students are assessed an additional fee of 20% of base tuition charge only. There is also, a $15 registration fee for everyone.
For example, a student who is designated in-state, is carrying 15 credits, and is majoring in biology (major code ‘O’) will be charged $1000 for tuition: $950 for full-time status, $35 laboratory fee, and $15 registration fee.
A student taking 10 credits who has out-of-state status and is a computer science major (major code ‘C’) will be charged $940, which is $750 based on 10 credits at $75 per credit hour, $150 out-of-state fee (20% of $750) plus a $25 laboratory fee and $15 registration fee.
1. Develop an algorithm (using a flowchart) to compute the cost of attending college given the following inputs:
a) number of credit hours
b) Major Code
‘C’ or ‘c’ - computer science major
‘O’ or ‘o’ - other laboratory sciences
anything else - other majors
c) Residency status
1 – In State
2 – Out of State
Here is my program so far, it might need some work, any advice would be appreciated.
#include <iostream>
#include <iomanip.h>
// Variable
double credit_hour; //credit hours taken
char major_code; // 'C' computer scienc or 'O' laboratory science
char residency; // '1' in state or '2' out of state
And if it says you're missing a semicolon, you should probably just go to the line the error points you to and put a semicolon there. It IS possible that this is not the actual error, but in most cases it is.
Error E2379 C:\Users\Ben\Desktop\New Borland\college3.cpp 80: Statement missing ; in function main()
Warning W8004 C:\Users\Ben\Desktop\New Borland\college3.cpp 83: 'tuition_cost' is assigned a value that is never used in function main()
*** 1 errors in Compile ***
Notice that if you read the error, it says that in file "college3.cpp", on line 80, you are missing a semicolon.
There is also a warning. Warnings will allow the program to compile, but indicate you may have a problem running it. The warning says that on line 83, you assign a value to "tuition_cost", but then never use it anywhere.