Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

THIS QUESTION HAS 2 PARTS: programming in c 1. a main function with the function calls to GetPoints and GetLetter . Declare any variables and

THIS QUESTION HAS 2 PARTS: programming in c

1. a main function with the function calls to GetPoints and GetLetter. Declare any variables and assign values as needed. The argument to GetPoints should be the letter returned from GetLetter.

2.Include the function definitions described below. Declare any variables and assign values as needed.

you do not need to include comments or preprocessor directives, assume you can use stdio.h and ctype.h functions

Function 1. Write a function definition called GetLetter that takes no arguments and returns a character. The function will prompt the user to enter a character, get the character, change the character to uppercase, and return it.

Function 2. Write a function definition called GetPoints that takes one character argument and returns a double, The function will return a 4.0 if the letter argument is an A, it will return 2.0 if the letter argument is a C, and it will return 0.0 if the letter argument is any other letter (not an A or a C).

//prototypes

char GetLetter( );

double GetPoints ( char letter);

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

Visual Basic6 Database Programming

Authors: John W. Fronckowiak, David J. Helda

1st Edition

0764532545, 978-0764532542

More Books

Students also viewed these Databases questions