Guest User

Untitled

a guest
Jun 23rd, 2018
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.91 KB | None | 0 0
  1. #include <iostream>
  2. #include <iomanip>
  3. using namespace std;
  4. //Preprocessor directives
  5.  
  6. int main(){//Begin main
  7. system("color f0");
  8.  
  9. cout<<"***************************************************"<<endl;
  10. cout<<"*\tIT 210 Business Applications with C++ *"<<endl;
  11. cout<<"*\tProgrammer: Robert Beimler *"<<endl;
  12. cout<<"*\tDate: February 13, 2012 *"<<endl;
  13. cout<<"*\tStudent Grades *"<<endl;
  14. cout<<"***************************************************"<<endl;
  15. //Descriptive Header
  16. string firstName;
  17. string middleInitial;
  18. string lastName;
  19. int firstProgram;
  20. int secondProgram;
  21. int thirdProgram;
  22. int fourthProgram;
  23. int firstTest;
  24. int secondTest;
  25. int thirdTest;
  26. float programAverage=(firstProgram+secondProgram+thirdProgram+fourthProgram)/4;
  27. float testAverage;
  28. float courseAverage;
  29. char letterGrade;
  30. //Variable declarations
  31. //Variables to declare: /firstName, /middleInitial, /lastName, /firstProgram, /secondProgram, /thirdProgram, /fourthProgram, /firstTest, /secondTest, /thirdTest, /programAverage, /testAverage, /courseAverage, /letterGrade
  32.  
  33. cout<<"Please enter your first name, middle initial and last name: ";
  34. cin>>firstName>>middleInitial>>lastName;
  35.  
  36. cout<<"Thank you, your name is "<<firstName<<" "<<middleInitial<<" "<<lastName<<"."<<endl;
  37.  
  38. cout<<"Please enter your first program score (0-100): "<<endl;
  39. cin>>firstProgram;
  40. cout<<"You entered "<<firstProgram<<"."<<endl;
  41. cout<<" "<<endl;
  42.  
  43. cout<<"Please enter your second program score (0-100): "<<endl;
  44. cin>>secondProgram;
  45. cout<<"You entered "<<secondProgram<<"."<<endl;
  46. cout<<" "<<endl;
  47.  
  48. cout<<"Please enter your third program score (0-100): "<<endl;
  49. cin>>thirdProgram;
  50. cout<<"You entered "<<thirdProgram<<"."<<endl;
  51. cout<<" "<<endl;
  52.  
  53. cout<<"Please enter your fourth program score (0-100): "<<endl;
  54. cin>>fourthProgram;
  55. cout<<"You entered "<<fourthProgram<<"."<<endl;
  56. cout<<" "<<endl;
  57.  
  58. cout<<"Please enter your first test score (0-100): "<<endl;
  59. cin>>firstTest;
  60. cout<<"You entered "<<firstTest<<"."<<endl;
  61. cout<<" "<<endl;
  62.  
  63. cout<<"Please enter your second test score (0-100): "<<endl;
  64. cin>>secondTest;
  65. cout<<"You entered "<<secondTest<<"."<<endl;
  66. cout<<" "<<endl;
  67.  
  68. cout<<"Please enter your third test score (0-100): "<<endl;
  69. cin>>thirdTest;
  70. cout<<"You entered "<<thirdTest<<"."<<endl;
  71. cout<<" "<<endl;
  72.  
  73. cout<<"=============================================="<<endl;
  74. cout<<"Name: "<<firstName<<" "<<middleInitial<<" "<<lastName<<endl;
  75. cout<<""<<endl;
  76. cout<<setw(25)<<left<<setfill('.')<<"Program Average"<<" "<<programAverage<<endl;
  77. cout<<""<<endl;
  78.  
  79.  
  80. //use . fill character
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93. system("pause");
  94. return 0;
  95. }
Add Comment
Please, Sign In to add comment