Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <iomanip>
- using namespace std;
- //Preprocessor directives
- int main(){//Begin main
- system("color f0");
- cout<<"***************************************************"<<endl;
- cout<<"*\tIT 210 Business Applications with C++ *"<<endl;
- cout<<"*\tProgrammer: Robert Beimler *"<<endl;
- cout<<"*\tDate: February 13, 2012 *"<<endl;
- cout<<"*\tStudent Grades *"<<endl;
- cout<<"***************************************************"<<endl;
- //Descriptive Header
- string firstName;
- string middleInitial;
- string lastName;
- int firstProgram;
- int secondProgram;
- int thirdProgram;
- int fourthProgram;
- int firstTest;
- int secondTest;
- int thirdTest;
- float programAverage=(firstProgram+secondProgram+thirdProgram+fourthProgram)/4;
- float testAverage;
- float courseAverage;
- char letterGrade;
- //Variable declarations
- //Variables to declare: /firstName, /middleInitial, /lastName, /firstProgram, /secondProgram, /thirdProgram, /fourthProgram, /firstTest, /secondTest, /thirdTest, /programAverage, /testAverage, /courseAverage, /letterGrade
- cout<<"Please enter your first name, middle initial and last name: ";
- cin>>firstName>>middleInitial>>lastName;
- cout<<"Thank you, your name is "<<firstName<<" "<<middleInitial<<" "<<lastName<<"."<<endl;
- cout<<"Please enter your first program score (0-100): "<<endl;
- cin>>firstProgram;
- cout<<"You entered "<<firstProgram<<"."<<endl;
- cout<<" "<<endl;
- cout<<"Please enter your second program score (0-100): "<<endl;
- cin>>secondProgram;
- cout<<"You entered "<<secondProgram<<"."<<endl;
- cout<<" "<<endl;
- cout<<"Please enter your third program score (0-100): "<<endl;
- cin>>thirdProgram;
- cout<<"You entered "<<thirdProgram<<"."<<endl;
- cout<<" "<<endl;
- cout<<"Please enter your fourth program score (0-100): "<<endl;
- cin>>fourthProgram;
- cout<<"You entered "<<fourthProgram<<"."<<endl;
- cout<<" "<<endl;
- cout<<"Please enter your first test score (0-100): "<<endl;
- cin>>firstTest;
- cout<<"You entered "<<firstTest<<"."<<endl;
- cout<<" "<<endl;
- cout<<"Please enter your second test score (0-100): "<<endl;
- cin>>secondTest;
- cout<<"You entered "<<secondTest<<"."<<endl;
- cout<<" "<<endl;
- cout<<"Please enter your third test score (0-100): "<<endl;
- cin>>thirdTest;
- cout<<"You entered "<<thirdTest<<"."<<endl;
- cout<<" "<<endl;
- cout<<"=============================================="<<endl;
- cout<<"Name: "<<firstName<<" "<<middleInitial<<" "<<lastName<<endl;
- cout<<""<<endl;
- cout<<setw(25)<<left<<setfill('.')<<"Program Average"<<" "<<programAverage<<endl;
- cout<<""<<endl;
- //use . fill character
- system("pause");
- return 0;
- }
Add Comment
Please, Sign In to add comment