Question 1) You are writing a program that determines the hypotenuse of a right triangle. Through Pythagorean's Theorem, you are able to find the value of the hypotenuse. The theorem is: c = Va² + b² Write a user defined function called Hypotenuse. The user defined function has two parameters of type double called a and b. The function will calculate the hypotenuse and returns the resulting value back to the main function to be displayed. Inside the main function, collect the values for the two arguments before calling it. Question 2) A parking garage charges customers to park their car at a rate $2.49 per hour. Write code that prompts users to enter the amount hours they plan to leave their cars parked. The program will display the number of hours and the amount charged to the user. The monetary value displayed has to include $ and two decimal places. All of this is to be completed in a user defined function called ParkingCharge. The function will not return anything.
Question 1) You are writing a program that determines the hypotenuse of a right triangle. Through Pythagorean's Theorem, you are able to find the value of the hypotenuse. The theorem is: c = Va² + b² Write a user defined function called Hypotenuse. The user defined function has two parameters of type double called a and b. The function will calculate the hypotenuse and returns the resulting value back to the main function to be displayed. Inside the main function, collect the values for the two arguments before calling it. Question 2) A parking garage charges customers to park their car at a rate $2.49 per hour. Write code that prompts users to enter the amount hours they plan to leave their cars parked. The program will display the number of hours and the amount charged to the user. The monetary value displayed has to include $ and two decimal places. All of this is to be completed in a user defined function called ParkingCharge. The function will not return anything.
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
C
**Please put comments when needed.
** I send two exercises. They all need to be in one file. I need the code of the second one BUT SINCE I MAKE MISTAKE EVERYTIME I AM PUTING TWO OR MORE EXERCISES IN ONE FILE, I JUST WANT TO SEE HOW TO DO IT WELL.
**SO PLEASE IF YOU CAN, DO ALL OF THEM IN THE SAME C FILE? AND MAKE SURE IT RUNS GREAT.
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 2 steps
Recommended textbooks for you
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education