2. Write a program that computes a weighted average giving the following weights.
Homework: 10%
Projects: 35%
Quizzes: 10%
Exams: 30%
Final Exam: 15%
Do a compile-time initialization with the following values:Homework: 97; Projects: 82; Quizzes: 60; Exams: 75; Final Exam 80. Display all values, including the weights, appropriately labeled and formatted. Rerun the application with different values.
1
Expert's answer
2017-08-01T06:14:10-0400
using System.IO; using System;
/* Write a program that computes a weighted average giving the following weights. Homework: 10% Projects: 35% Quizzes: 10% Exams: 30% Final Exam: 15% Do a compile-time initialization with the following values: Homework: 97; Projects: 82; Quizzes: 60; Exams: 75; Final Exam 80. Display all values, including the weights, appropriately labeled and formatted. Rerun the application with different values. */
class Program { static void Main(){ //weights int HomeworkWeight=10; int ProjectsWeight=35; int QuizzesWeight=10; int ExamsWeight=30; int FinalExamWeight=15;
//values int Homework=97; int Projects=82; int Quizzes=60; int Exams= 75; int FinalExam=80;
//other values /* int Homework=90; int Projects=75; int Quizzes=80; int Exams= 64; int FinalExam=82; */
Comments
Leave a comment