1- (50 points) The function sum_n_avg computes the sum and the average of three input
arguments and relays its results through two output parameters.a) Write a prototype for a function sum_n_avg that accepts three double-type input
parameters and returns two output parameters (in the form of pointers).b) Write the function definition for function sum_n_avg. The function definition is where
the actual computations are performed.c) Write a function call in main () for sum_n_avg. The function call can look like below:
{
double one, two, three, sum_of_3, avg_of_3;
printf(Enter three numbers> );
scanf(%lf%lf%lf, &one, &two, &three);
sum_n_avg(__________________________________);
. . .
}2- (50 points) The intention of this problem is to analyze a user input word, and display the letter
that it starts with (book B).(a) Create a function prototype for a function that accepts a word less than 25 characters
long, and return a character.(b) Write the function definition for this function that evaluates the input word and returns
the letter that the word starts with in capital letter (if its in small letters).(c) Create a function call in the main function, and use the function output to print the
following message based on the input from the user. (Remember to have a command
prompt in the main function requesting the user to enter any word.)
Computer starts with the letter C.
Summer starts with the letter S.(d) Make sure to consider the case where a naughty user enters characters other than the
alphabet to form a word and display a relevant message, and return null character.
%sb$ is not a word.
$500 is not a word.(e) Have the program process words until it encounters a word beginning with the character
#.
Note: Use the ctype library to facilitate your solution for this problem.
2220, 7, Assignment, COP, solved
[SOLVED] Cop 2220 assignment 7
$25
File Name: Cop_2220_assignment_7.zip
File Size: 197.82 KB
Only logged in customers who have purchased this product may leave a review.
Reviews
There are no reviews yet.