Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a program that calculates and displays the area of a triangle based on the user input values of the base and the height
Write a program that calculates and displays the area of a triangle based on the user input values of the base and the height of a triangle. Area 2 (base) (height) a height b base Make sure your program asks the user his/her full name and then greet the user. After that, tell the user what the program is all about. The program will then ask the user to enter the base and the height of a triangle. The program will calculate and print the area of the triangle. Make sure to test your program with different input values. Your program should reject zero or negative numbers. Below is an example of a running program: Welcome to my program. Please enter your full name: Jane Doe Hello, Jane Doe This program will ask you to enter the base and the height of a triangle. The program will calculate and print the area of the triangle. Enter base of triangle: 7.5 Enter height of triangle: 10.2 The area is: 38.25 Thank you and have a nice day. Good bye!
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Algorithm Greet the User Ask the user for their full name and greet them Expl...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started