Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Ir The le name For the problem 1 will be shapes: - Thele name for the problem 2 will he nddds; 1. [11: points] Write

image text in transcribedimage text in transcribedimage text in transcribed
Ir The le name For the problem 1 will be shapes: - Thele name for the problem 2 will he nddds; 1. [11: points] Write a program In C that output: a menu and reads a shape choice (circle. rectangle, or triangle}. The program should then prompt for the appropriate dimEHSiOI'IS and calculate the area Of the shape \"WISE\". The output of 'your program must follow the format as shown in the test runs. Test Run 1: Shape Menu 1. Circle 2. Rectangle 3. Triangle Shape l1. 2. or 3|? 1 Radius? 4.? The area of the shape Is 63.33! square units. Test Hull 1: Shape Menu 1. Circle 2. Rectangle 3. Triangle Shape l1. 2. or 3]? 2 Wldth? 2.3 Height? 4.5 The area of the shape is 1035!!) square units. Tllit Run 3: Shape Menu 1. Circle 2. Rectangle 3. Triangle Shape i1. 2. or 3|? 3 Base? 4 Height? 3.5 The area of the shape is mm square units. 2. [Points 10] Write a C program to determine and print the odd numbers between two integer numbers provided by the user. You can assume that the second number will always be greater than the first one. The output of your program must follow the format as shown in the test runs. Test Run 1: Enter the first number: 0 Enter the second number ( > first number): 99 The odd numbers between 0 and 99 are: 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99 Test Run 2: Enter the first number: 56 Enter the second number ( > first number): 57 The odd numbers between 56 and 57 are: 57Test Run: 4 Shape Menu 1. Circle 2. Rectangle 3. Triangle Shape (1, 2, or 3)? 4 4 is an invalid option. Program terminated

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

Financial management theory and practice

Authors: Eugene F. Brigham and Michael C. Ehrhardt

12th Edition

978-0030243998, 30243998, 324422695, 978-0324422696

Students also viewed these Programming questions