Question

In: Computer Science

C# Programming Language Write a C# program ( Console or GUI ) that prompts the user...

C# Programming Language

Write a C# program ( Console or GUI ) that prompts the user to enter the three examinations ( test 1, test 2, and test 3), homework, and final project grades then calculate and display the overall grade along with a message, using the selection structure (if/else). The message is based on the following criteria:

  • “Excellent” if the overall grade is 90 or more.
  • “Good” if the overall grade is between 80 and 90 ( not including 90)
  • “Above Average” is the overall grade is between 70 and 80 ( not including 80)
  • “Average” if the overall grade is between 60 and 70 ( not including 70)
  • "Poor" if the overall grade is less than 60 ( not including 60)

Solutions

Expert Solution

using System;
class HelloWorld {
  static void Main() {
      double test1,test2,test3,homework,finalproject,finalgrade;
    Console.WriteLine("Enter test 1 grade mark");
    test1= Convert.ToDouble(Console.ReadLine());
    Console.WriteLine("Enter test 2 grade mark");
    test2= Convert.ToDouble(Console.ReadLine());
    Console.WriteLine("Enter test 3 grade mark");
    test3= Convert.ToDouble(Console.ReadLine());
    Console.WriteLine("Enter homework grade mark");
    homework= Convert.ToDouble(Console.ReadLine());
    Console.WriteLine("Enter finalproject grade mark");
    finalproject= Convert.ToDouble(Console.ReadLine());
    finalgrade=(test1+test2+test3+homework+finalproject)/5;
    if (finalgrade >= 90) 
    {
       Console.WriteLine("Excellent");
    } 
    else if (80<= finalgrade && finalgrade< 90) 
    {
       Console.WriteLine("Good");
    } 
    else if(70<= finalgrade && finalgrade <80)
    {
       Console.WriteLine("Above Average");
    }
    else if(60<= finalgrade && finalgrade <70)
    {
       Console.WriteLine("Average");
    }
    else if(finalgrade <60)
    {
       Console.WriteLine("Poor");
    }
    
  }
}

Related Solutions

Write a C++ console program that prompts a user to enter information for the college courses...
Write a C++ console program that prompts a user to enter information for the college courses you have completed, planned, or are in progress, and outputs it to a nicely-formatted table. Name the CPP as you wish (only use characters, underscores and number in your file name. DO NOT use blank). Its output should look something like this: Course Year Units Grade ---------- ---- ----- ----- comsc-110 2015 4 A comsc-165 2016 4 ? comsc-200 2016 4 ? comsc-155h 2014...
in C++ programing language Write a program that prompts the user for an integer, then prints...
in C++ programing language Write a program that prompts the user for an integer, then prints all of the numbers from one to that integer, separated by spaces. Use a loop to print the numbers. But for multiples of three, print "Fizz" instead of the number, and for the multiples of five print "Buzz". For numbers which are multiples of both three and five print "FizzBuzz". Drop to a new line after printing each 20 numbers. If the user typed...
C programming. Write a program that prompts the user to enter a 6x6 array with 0...
C programming. Write a program that prompts the user to enter a 6x6 array with 0 and 1, displays the matrix, and checks if every row and every column have the even number of 1’s.
write this program in C++ Write a program that prompts a user for three characters. The...
write this program in C++ Write a program that prompts a user for three characters. The program must make sure that the input is a number 10 - 100 inclusive. The program must re prompt the user until a correct input is entered. Finally output the largest and the lowest value. Example 1: Input : 10 Input : 20 Input : 30 The largest is 30. The lowest is 10. Example 2: Input : 100 Input : 50 Input :...
Write a C++ program that prompts the user for the radius of a circle and then...
Write a C++ program that prompts the user for the radius of a circle and then calls inline function circleArea to calculate the area of that circle. It should do it repeatedly until the user enters -1. Use the constant value 3.14159 for π Sample: Enter the radius of your circle (-1 to end): 1 Area of circle with radius 1 is 3.14159 Enter the radius of your circle (-1 to end): 2 Area of circle with radius 2 is...
java language NetBeans Write a program that prompts the user to enter the weight of a...
java language NetBeans Write a program that prompts the user to enter the weight of a person in kilograms and outputs the equivalent weight in pounds. Output both the weights rounded to two decimal places. (Note that 1 kilogram = 2.2 pounds.) Format your output with two decimal places.
Using c# programming language Write a program that mimics a lottery game. Have the user enter...
Using c# programming language Write a program that mimics a lottery game. Have the user enter 3 distinct numbers between 1 and 10 and match them with 3 distinct, randomly generated numbers between 1 and 10. If all the numbers match, then the user will earn $10, if 2 matches are recorded then the user will win $3, else the user will lose $5. Keep tab of the user earnings for, let say 5 rounds. The user will start with...
Using C# programming language, Write a program that sort three numbers entered by the user using...
Using C# programming language, Write a program that sort three numbers entered by the user using only if and nested if statements. If for instance the user entered 5, 2, and 7; the program should display 2,5,7.
C++ Question: write a program that prompts the user for the length and width of a...
C++ Question: write a program that prompts the user for the length and width of a rectangle in inches.  The program then uses functions to compute the perimeter and area of the rectangle and to convert those to meters and square meters respectively. Sample output from one instance of the program is shown below: ```html Welcome to the Foot-To-Meter Rectangle Calculator ================================================= Enter the rectangle length in feet: 2 Enter the rectangle width in feet: 3 The rectangle dimensions are: 0.61...
IN C++ Write a program that prompts the user to enter the number of students and...
IN C++ Write a program that prompts the user to enter the number of students and each student’s name and score, and finally displays the student with the highest score (display the student’s name and score). Also calculate the average score and indicate by how much the highest score differs from the average. Use a while loop. Sample Output Please enter the number of students: 4 Enter the student name: Ben Simmons Enter the score: 70 Enter the student name:...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT