Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

using System; namespace HelloWorld { class Program { static void Main(string[] args) { Console.WriteLine(Hi, I'm Thomas, these are my grades.); Console.WriteLine(); Console.WriteLine(Algebra: + letterGrade(80));

using System;

namespace HelloWorld { class Program { static void Main(string[] args) { Console.WriteLine("Hi, I'm Thomas, these are my grades."); Console.WriteLine(); Console.WriteLine("Algebra: " + letterGrade(80)); Console.WriteLine("Systems Programming: " + letterGrade(25)); Console.WriteLine("Philosophy: " + letterGrade(100)); Console.WriteLine("Psychology: " + letterGrade(75)); Console.WriteLine("English: " + letterGrade(60)); } public static string letterGrade(int grade) { if (grade > 89) { return "A"; } else { return "F"; } } } }

2. Change the code in the letter grade function so that it accounts for Bs (80-89), Cs (70-79), and Ds (60-69). Do not change the code in the main function, as this code represents five test cases for the letter grade function.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

How can the Internet be helpful in a job search? (Objective 2)

Answered: 1 week ago