Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

how to use visual studio c++? please how to solve this program and please give me detail. please show me how to this one and

image text in transcribed

how to use visual studio c++?

please how to solve this program and please give me detail.

please show me how to this one and give to detail. thank you.

Program #2 Please write a working C++ program that implements the following pseudocode. (Note: this project is based on the formula S (L at2, which calculates the distance traveled under acceleration "a" and time "t".) Create a variable of type float named time and store the value 5.0 in it. Create a variable of type float named acceleration and store the value 32.0 in it Create a variable of type double named distance. Calculate the value Saccording to the formula S (1.0/2) a r and store that result in the variable distance Display the results as follows The time was 5.0 sec 32.0 feet/sec/sec The acceleration was: The distance traveled was XXXX.X feet. Of course, the "XXXX.X" value should be replaced by the calculated number. Note that the results should all line up as illustrated here, and that each number should be followed by the given units NOTE: In C++, controlling the number of decimal places that are displayed when floating point type variables are printed requires the use of"stream manipulators" that we haven't yet covered. If you put the following iinclude statement at the top of your program include kiomanip and include the following cout statement immediately prior to the first output statement, it should take care of the problem for now: cout fixed Setprecision (1) CS1336-Programming Fundamentals page: 3 This statement only needs to be executed one time. It will force C++ to display one decimal point when floating point numbers are printed. We'll discuss this issue in more detail when we get to it in lecture

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

Harness The Power Of Big Data The IBM Big Data Platform

Authors: Paul Zikopoulos, David Corrigan James Giles Thomas Deutsch Krishnan Parasuraman Dirk DeRoos Paul Zikopoulos

1st Edition

0071808183, 9780071808187

More Books

Students also viewed these Databases questions