Question: I screenshot my work, but do not if i put extra in that does not need to be there or if i am missing something to not be able to get rid of the errors listed at the bottom. theyre both in...



Question:I screenshot my work, but do not if i put extra in that does not need to be there or if i am missing something to not be able to get rid of the errors listed at the bottom. theyre both in relation to line 1 and i dont even see a probelm with the line.



Assignment:Write a C++ program that computes a student’s grade for an assignment as a percentage given the student’s score and total points. The final score must be rounded up to the nearest whole value using the ceil function in the header file. You must also display the floating-point result up to 5 decimal places. The input to the program must come from a file containing a single line with the score and total separated by a space. In addition, you must print to the console “Excellent” if the grade is greater than or equal to 90, “Well Done” if the grade is less than 90 and greater than or equal to 80, “Good” if the grade is less than 80 and greater than or equal to 70, “Need Improvement” if the grade is less than 70 and greater than or equal to 60, and “Fail” if the grade is less than 60.


30<br>total[totalValue]<br>value;<br>=<br>31<br>//increment the counter<br>32<br>totalValue++;<br>33<br>34<br>35<br>36<br>for (int i = 0; i < totalValue; i++)<br>37<br>38<br>//calculate percentage<br>39<br>grade = score[i]/total[i];<br>//display percentage in floating-point with the five decimal places<br>cout <« fixed <« ceil(grade * 100) « = 90) { //display grade 42 43 44 45 46 cout < "excellent"="">< endl;="" }="" when="" percentage="" is="" less="" than="" 90="" and="" greater="" than="" or="" equal="" to="" 80="" else="" if="" (cei1(grade="" *="" 100)="">= 80) { //display grade cout <« "well-done"="">< endl;="" 47="" 48="" 49="" 50="" 51="" 52="" }="" when="" percentage="" is="" less="" than="" 80="" and="" greater="" than="" or="" equal="" to="" 70="" else="" if="" (ceil(grade="" *="" 100)="">= 70) { //display grade 53 54 55 56 57 58 cout <« "good"="">< endl;="" }="" when="" percentage="" is="" less="" than="" 70="" and="" greater="" than="" or="" equal="" to="" 60="" else="" if="" (cei1(grade="" *="" 100)="">= 60) { //display grade cout <« "need="" improvement"="">< endl;="" }="" when="" the="" percentage="" is="" less="" than="" 60="" 59="" 60="" 61="" 62="" 63="" 64="" 65="" 66="" 67="" else="" {="" display="" grade="" cout="">< "fail"="">< endl;="" 68="" 69="" 70="" 71="" }="" 72="" 73="" program="" logic="" closing="" program="" statements="" system("pause");="" 74="" 75="" 76="" return="" 0;="" 77="" 78="" function="" definitions="" 0-="" "/="">
Extracted text: 30 total[totalValue] value; = 31 //increment the counter 32 totalValue++; 33 34 35 36 for (int i = 0; i < totalvalue;="" i++)="" 37="" 38="" calculate="" percentage="" 39="" grade="score[i]/total[i];" display="" percentage="" in="" floating-point="" with="" the="" five="" decimal="" places="" cout=""><« fixed=""><« ceil(grade="" *="" 100)="" «="" "%"="">< fixed="">< grade;="" 40="" 41="" when="" percentage="" is="" greater="" than="" or="" equal="" to="" 90="" if="" (ceil(grade="" *="" 100)="">= 90) { //display grade 42 43 44 45 46 cout < "excellent"="">< endl;="" }="" when="" percentage="" is="" less="" than="" 90="" and="" greater="" than="" or="" equal="" to="" 80="" else="" if="" (cei1(grade="" *="" 100)="">= 80) { //display grade cout <« "well-done"="">< endl;="" 47="" 48="" 49="" 50="" 51="" 52="" }="" when="" percentage="" is="" less="" than="" 80="" and="" greater="" than="" or="" equal="" to="" 70="" else="" if="" (ceil(grade="" *="" 100)="">= 70) { //display grade 53 54 55 56 57 58 cout <« "good"="">< endl;="" }="" when="" percentage="" is="" less="" than="" 70="" and="" greater="" than="" or="" equal="" to="" 60="" else="" if="" (cei1(grade="" *="" 100)="">= 60) { //display grade cout <« "need="" improvement"="">< endl;="" }="" when="" the="" percentage="" is="" less="" than="" 60="" 59="" 60="" 61="" 62="" 63="" 64="" 65="" 66="" 67="" else="" {="" display="" grade="" cout="">< "fail"="">< endl;="" 68="" 69="" 70="" 71="" }="" 72="" 73="" program="" logic="" closing="" program="" statements="" system("pause");="" 74="" 75="" 76="" return="" 0;="" 77="" 78="" function="" definitions="">
D//<Headache Creator><br>-- if/else assignment<br>//CSIS 111-<D01> ADD YOUR SECTION NUMBER<br>//<Sources if necessary><br>| //Include statements<br>E#include <iostream><br>#include <string><br>#include <cmath><br>8<br>#include <fstream><br>using namespace std;<br>B//Global declarations: Constants and type definitions only -- no variables<br>| //Function prototypes<br>Bint main()<br>{<br>//In cout statement below SUBSTITUTE your name and lab number<br>10<br>11<br>12<br>13<br>14<br>15<br>cout << > value; 23 24 25 //add student score in the array score[totalValue] = value; //get the total from the file fromFile >> value; 26 27 28 //add total in the array total[totalValue] = value; 29 30 31 //increment the counter 32 totalValue++; 33 34 35 36 for (int i = 0; i < totalvalue;="" i++)="" 1="" 2="" 3="" 4="" 5="" 6="" 7co="" 0으-의의의밀="" 음답="" "/="">
Extracted text: D// -- if/else assignment //CSIS 111- ADD YOUR SECTION NUMBER // | //Include statements E#include #include #include 8 #include using namespace std; B//Global declarations: Constants and type definitions only -- no variables | //Function prototypes Bint main() { //In cout statement below SUBSTITUTE your name and lab number 10 11 12 13 14 15 cout < "julianna="" brown="" lab="" number="" 3"=""><« endl="" «="" endl;="" 16="" variable="" declarations="" double="" score[20],="" total[20],="" value,="" grade;="" int="" totalvalue="0;" 17="" 18="" create="" an="" object="" of="" the="" input="" stream="" ifstream="" fromfile;="" 19="" 20="" opening="" the="" file="" fromfile.open("input.txt");="" 21="" 22="" get="" student="" score="" from="" the="" file="" fromfile="">> value; 23 24 25 //add student score in the array score[totalValue] = value; //get the total from the file fromFile >> value; 26 27 28 //add total in the array total[totalValue] = value; 29 30 31 //increment the counter 32 totalValue++; 33 34 35 36 for (int i = 0; i < totalvalue; i++) 1 2 3 4 5 6 7co 0으-의의의밀 음답 totalvalue;="" i++)="" 1="" 2="" 3="" 4="" 5="" 6="" 7co="" 0으-의의의밀="">
Jun 08, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here