Answer to Question #292579 in C# for Dave

Question #292579

Write a program named Admission for a college’s admissions office. The user enters a numeric high school grade point average (for example, 3.2) and an admission test score (for example, 75). Display the message "Accept" if the student meets either of the following requirements:



A grade point average of 3.0 or higher, and an admission test score of at least 60


A grade point average of less than 3.0, and an admission test score of at least 80


If the student does not meet either of the qualification criteria, display "Reject".


1
Expert's answer
2022-01-31T16:18:09-0500
using System;

namespace Admission
{
    class Program
    {
        public static void Main(string[] args)
        {
            float avg;
            int score;
            Console.WriteLine("Grade point average: ");
            avg = float.Parse(Console.ReadLine(), System.Globalization.CultureInfo.InvariantCulture);  //decimal mark is "."
            Console.WriteLine("Admission test score: ");
            score = int.Parse(Console.ReadLine());    
            if ((avg >= 3) && (score >= 60) || (avg < 3) && (score >= 80))
                Console.Write("Accept");
            else
                Console.Write("Reject");
            Console.ReadKey(true);
        }
    }
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS