Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need help with creating a code without using an array? I am using putty, which has c language. It gives me errors with indention

image text in transcribed

I need help with creating a code without using an array? I am using putty, which has c language. It gives me errors with indention and functions.

DO NOT USE ARRAYS IF YOU KNOW ABOUT ARRAYS, I WANT YOU TO USE 3 VARIABLES, IT WILL FORCE YOU TO USE COMPOUND LOGICAL STATEMENTS FOR THE IF STATEMENTS Create a program that will display a menu to the user. The choices should be as follows 1. Enter 3 grades 2. Show average (with the 3 grades) and letter grade 3. Show highest grade 4. Show lowest grade 5. Exit If you want to put the menu into a function you may. The program should use a switch statement for using the appropriate function based on the user's choice. Each option should be implemented in its own function (I use the word function 1, function 2, I want you to come up with appropriate names for the functions). Initialize the variables for grades randomly between 50-100 so if the user select show average as their first choice, there will be some random grades in the variables already You should have the following functions: Function 1: This function will ask the user for a single grade that will be passed back to the main function. The function should validate that the grade is in the range between 0-100 otherwise ask the user to enter another grade. This function should be called 3 times from the main to place the appropriate values into the grade variables. Function 2: This function will calculate the average of the 3 grades passed in and display the average with 1 decimal place and display the letter grade based on the following scale: age Letter Gr 90 79 69 60 Function 3: This function will receive 3 grades as parameters and returns the highest grade to the main. The main will use that value to display the highest grade. Do not display the highest grade in this function. Function 4: This function will receive 3 grades as parameters and returns the lowest grade to the main. The main will use that value to display the lowest grade. Do not display the highest grade in this function. Use a loop to repeat the entire program until the users hits S to exit

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_2

Step: 3

blur-text-image_3

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

How To Build A Million Dollar Database

Authors: Michelle Bergquist

1st Edition

0615246842, 978-0615246840

More Books

Students also viewed these Databases questions

Question

5. Discuss the role of the Web in career management.

Answered: 1 week ago

Question

4. Design a career management system.

Answered: 1 week ago