Question

In: Computer Science

Write a C program that calculates a student grade in the C Programming Class. Ask the...

Write a C program that calculates a student grade in the C Programming Class. Ask the user to enter the grades for each one of the assignments completed in class:

  • Quiz #1 - 25 points
  • Quiz #2 - 50 points
  • Quiz #3 - 30 points
  • Project #1 - 100 points
  • Project #2 - 100 points
  • Final Test - 100 points

The total of the quizzes count for a 30% of the total grade, the total of the projects counts for a 50% of the total class grade and the final test counts for the 20% left.

Solutions

Expert Solution

Thanks for the question. Below is the code you will be needing. Let me know if you have any doubts or if you need anything to change.

If you are satisfied with the solution, please leave a +ve feedback : ) Let me know for any help with any other questions.

Thank You!
===========================================================================

#include<stdio.h>

int main(void){
  
   int quiz1, quiz2, quiz3, quizTotal;
   int proj1, proj2, projTotal;
   int finalTest;
  
   double grade;
  
   printf("Enter score in Quiz 1: ");scanf("%d", &quiz1);
   printf("Enter score in Quiz 2: ");scanf("%d", &quiz2);
   printf("Enter score in Quiz 3: ");scanf("%d", &quiz3);
  
   quizTotal = quiz1+quiz2+quiz3;
  
   printf("Enter score in project 1: ");scanf("%d", &proj1);
   printf("Enter score in project 2: ");scanf("%d", &proj2);
  
   projTotal = proj1+proj2;
  
   printf("Enter score in final test: ");scanf("%d", &finalTest);
  
   grade = quizTotal*0.3 + projTotal*0.5 + finalTest*0.2;
  
   printf("Final Grade: %.2f\n", grade);
  
}

======================================================================


Related Solutions

Write a C++ program named, myGrade.cpp, that calculates a letter grade for a student of this...
Write a C++ program named, myGrade.cpp, that calculates a letter grade for a student of this course (CSC100 online) based on three user inputs. This program should begin by printing the title of the application (program) and a brief description of what it does. (Note: this is NOT the same as the program prolog: a prolog is much more detailed, has required elements, and is intended for other programmers reading the cpp file. The title and description displayed by the...
Write a C program that prints the Grade of each student in a class based on...
Write a C program that prints the Grade of each student in a class based on their mark. The program must also print the average mark of the class. The program must prompt (ask) the user for the mark of a student (out of 100). The program must then print the mark entered and the grade received based on the table below. Grade Range A 85 to 100 inclusive B 75 to 85 inclusive C 60 to 70 inclusive D...
Write a program in C++ that calculates the sum of two fractions. The program should ask...
Write a program in C++ that calculates the sum of two fractions. The program should ask for the numerators and denominators of two fractions and then output the sum of the two fractions. You will need to write four functions for this program, one to read the inputted data, one to calculate the sum of the two fractions, one to find the Greatest Common Divider (GCD) between the numerator and denominator and a function that will display the end result....
In the C# programming language... Write a program to perform student record manage for class IST311....
In the C# programming language... Write a program to perform student record manage for class IST311. Create student record class (Student.cs) and it should get the student information from the user and set up student record class. The program will perform recording student’s grade information and compute final grade, and then print out the student’s class information. Student class definitions: It should contain attributes as following: first name, last name, 5 labs grade, 3 grade, final grade. Its member functions...
Write a C program that calculates the average grade for a specified number of students from...
Write a C program that calculates the average grade for a specified number of students from each student's test1 and test2 grades. The program must first ask the user how many students there are. Then, for each student, the program will ask the user for the test1 grade (grade #1) and test2 grade (grade #2). The program should be able to handle up to 100 students, each with 2 grades (test1 and test2). Use a two-dimensional float array to store...
Write a C program that calculates the average grade for a specified number of students from...
Write a C program that calculates the average grade for a specified number of students from each student's termtest and final grade. The program must first ask the user how many students there are. Then, for each student, the program will ask the user for the termtest grade (grade #1) and final grade (grade #2). The program should be able to handle up to 100 students, each with 2 grades (termtest and final). Use a two dimensional float array to...
Programming Assignment 1 Performance Assessment Objective: To write a C program (not C++) that calculates the...
Programming Assignment 1 Performance Assessment Objective: To write a C program (not C++) that calculates the average CPI, total processing time (T), and MIPS of a sequence of instructions, given the number of instruction classes, the CPI and total count of each instruction type, and the clock rate (frequency) of the machine. The following is what the program would look like if it were run interactively. Your program will read values without using prompts. Inputs: • Clock rate of machine...
Programming Assignment 1 Performance Assessment Objective: To write a C program (not C++) that calculates the...
Programming Assignment 1 Performance Assessment Objective: To write a C program (not C++) that calculates the average CPI, total processing time (T), and MIPS of a sequence of instructions, given the number of instruction classes, the CPI and total count of each instruction type, and the clock rate (frequency) of the machine. The following is what the program would look like if it were run interactively. Your program will read values without using prompts. Inputs: • Clock rate of machine...
Question: How do I write a program in C# that calculates a student's final grade for...
Question: How do I write a program in C# that calculates a student's final grade for a test with 20 multiple questions using arrays and helper methods? Instructions: (0-incorrect answer, 1-correct answer) If the student answered the question right, add .5 points to the running total. If the student didn’t answer correctly subtract .5 points from the running total. The running total is initialized with 5 points (so the student receives 5 points extra credit). To define the final grade...
Write a program that calculates the area and circumference of a circle. It should ask the...
Write a program that calculates the area and circumference of a circle. It should ask the user first to enter the number of circles n, then reads the radius of each circle and stores it in an array. The program then finds the area and the circumference, as in the following equations, and prints them in a tabular format as shown in the sample output. Area = πr2 , Circumference = 2πr, π = 3.14159 Sample Output: Enter the number...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT