Question: code in c please Write a loop that will prompt the user to enter characters and display a message as long as the user does

 code in c please Write a loop that will prompt the
user to enter characters and display a message as long as the
user does NOT enter a capital Q The messages are as follows:
code in c please

Write a loop that will prompt the user to enter characters and display a message as long as the user does NOT enter a capital Q The messages are as follows: for a capital A display "Add, for a capital D display "Delete" for any other input display "input is not recognized Declare and initialize any variables needed This question has 2 parts: A function definition and a main function with a function call. PART 1: Write a function definition for a function that takes one argument of type integer. Inside the function declare, prompt and read an integer from the keyboard. Subtract the parameter integer from the integer that was entered by the user. The function will return the result, the number entered by the user minus the parameter value. PART 2: Write a main function with a function call to the function defined above. Be sure to declare variables and assign values as needed. Write a function definition for a user-defined function called LuckyGame. The function takes one double argument and one integer argument. Inside the function declare ask and get the users initial - if the integer argument value is a greater than 0 - display "you win" and include the initial in the printf - add 100 bonus points to the double parameter value and return that result - if the integer argument value is a 0 - display "you did not win" and include the initial in the printf - subtract 100 bonus points to the double parameter value and return that result - if the integer argument value is negative - display "recheck your numbers" and include the initial in the printf - return the parameter value without changing it Declare all necessary variable

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!