Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

only c program Write a C program that do the following: Prompts the user to input an integer that represents one of the following choices

only c program image text in transcribed
image text in transcribed
Write a C program that do the following: Prompts the user to input an integer that represents one of the following choices to be computed: 1. Displacement 2. Acceleration Based on the choice value: If the user's choice is 1: Ask the user to enter the Final velocity Initial velocity Time Use the following equation to compute the displacement (in meters): Where d is displacement of an object (in meters), vyis its final velocity (in meters/second). wis its initial velocity (in meters/second), and t is time (in seconds). If the user's choice is 2: Ask the user to enter the : Final velocity Initial velocity Time Use the following equation to compute the acceleration (in meters'seconds: V- Where a is acceleration of car (in meters/second), w is its final velocity (in meters/second), w is its initial velocity (in meters/second), and is time (in seconds) If the user entered an incorrect choice (not 1 or 2), a warning message is displayed as follows: The only available choices are: 1. Displacement 2. Acceleration Based on the selected choice, the result is displayed, Sample input/output Choose one of the following to be computed: 1 - Displacement 2 - Acceleration What is your choice? 1 input the following information: Initial Velocity (m/s). Final Velocity (m/s): Time (s): 143 52.1 128 Displacement = 424.96 m Another sample: Choose one of the following to be computed: 1 - Displacement 2- Acceleration What is your choice? 2 Input the following information: Initial Velocity (m/s): 14.3 Final Velocity (m/s): 52.1 Time (s): 12.8 Acceleration = 2.953125 m/s^2 Another sample: Choose one of the following to compute the displacement: 1 - Using Final velocity 2-Using the Acceleration What is your choice? 4 The only available choices are: 1. Displacement 2. Acceleration

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

Database Fundamentals Study Guide

Authors: Dr. Sergio Pisano

1st Edition

B09K1WW84J, 979-8985115307

More Books

Students also viewed these Databases questions