I cannot figure out why my code for calculating student grades makes every number I enter an A. Here is the code. I hope someone can help.

Member Avatar
Member Avatar
+0 forum 1

So I have a programming lab that we did in class for a few months but I am having major difficulity on it. These are the directions: > Specifications for Calculate grades using loops 1. Create pseudo code for your program first, to be handed in. 2. Make the program user friendly. 3. Use a constant at the top of the program for: a. Test points percent = 65% b. Lab. points percent = 25% c. Note points percent = 25% 4. Make sure you use a loop for each of the three average calculations below. a. Average Test scores, …

Member Avatar
Member Avatar
+0 forum 4

So basically this is suppose to be a grade calculator and the program works, I now just have to put it into a do-while loop so it can work for more than one student. My professor wants it to say Y for another student and N to quit at the end. I'm having a hard time figuring how to make that work. Also he wants the averages to come out to two decimal places even if its just 88.00 but it isn't working when I use setprecision. Any suggestions would be grealy appreciated. #include <iostream> #include <iomanip> using namespace std; …

Member Avatar
Member Avatar
+0 forum 21

[CODE]public class Grades{ public int scoreTotal; public int numScores; double average; static String file = "randomNumbers.txt"; int lowest; int x; int temp; public static void main(String[] args) throws FileNotFoundException{ int scoreTotal = 0; int numScores = 0; double average = 0; int lowest = -1; int temp = 0; Scanner optScan = new Scanner(System.in); System.out.println("Do you want to drop your lowest score? Enter true or false."); boolean isDropped = optScan.nextBoolean(); Scanner scan = new Scanner(file); while(scan.hasNextInt()){ temp = scan.nextInt(); scoreTotal += temp; if(lowest>temp) { lowest = temp; } if(isDropped==true){ average = (scoreTotal-lowest)/(numScores-1); } else if(isDropped==false){ average = (scoreTotal/numScores); } } …

Member Avatar
Member Avatar
+0 forum 1

Hey guys I was wondering if I was doing this right or not. I am writing a program that asks for a grade like A, -A, B+, -B, B and so on. each letter grade is equal to a certain number like in a persons GPA, A = 4.0, -A = 3.67, B+ = 3.33. I want the user to enter the letter grades and have the numbers factored into the GPA. I have already written the program and it works when the numbers are entered but how do you save the numbers to the letter grades? Thank you. Things …

Member Avatar
Member Avatar
+0 forum 2

Hello. I have written my code and I am almost done, but I keep getting LNK2019 errors. I'm not sure what I'm doing wrong. Any suggestions? [CODE]#include <iostream> #include <cmath> #include <iomanip> using namespace std; int getStudentCount(void); double getExamScores (int noStudents); double getLabScores(int noStudents); double calculatePointGrades(double, double); char calculateLetterGrades(double); void showGradeData(double, double, double, double); int i, noStudents, sum=0; double exam[100], labAvg[100], gradePt[100]; double totalLabAvg=0, totalExam=0, classLabAvg, classExamAvg; char letterGrade[100]; int main() { getStudentCount(); getExamScores(noStudents); getLabScores(noStudents); calculatePointGrades(exam[i], labAvg[i]); calculateLetterGrades(gradePt[i]); showGradeData(exam[i], labAvg[i], letterGrade[i], gradePt[i]); system("pause"); } int getStudentCount() { cout<< "Please enter the number of students" << endl; cin>> noStudents; cout<< endl; …

Member Avatar
Member Avatar
+0 forum 4

how todesign automatic grading system online using java i want to create one web application which creates online grading system for the students. which displays their grades,marks and ranking ...

Member Avatar
Member Avatar
+0 forum 1

I need to write a program for class that calculates student averages and quiz averagages. It has to read a 2-dim array from a file that looks like this: 10 10 10 2 0 1 8 6 9 8 4 10 The four students are the rows and the three quizzes are the columns. Then I have to change the 2-dim inout into 1-dim arrays to get this output. My output needs to look like this: Student Averages Quizzes 1 10.0 10 10 10 2 1.0 2 0 1 3 7.7 8 6 9 4 7.3 8 4 10 Quiz …

Member Avatar
Member Avatar
+0 forum 2

The End.