Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using C++ . Declare a, b, c, theta, d as double Declare other variables as necessary Declare a constant PI as 3.14159 Take input from

Using C++ . Declare a, b, c, theta, d as double

Declare other variables as necessary

Declare a constant PI as 3.14159

Take input from user for a, b, c

Take input from user for theta (in degree)

Check the input for the validity

For example, if c is negative, then give output Invalid input

Similarly check for other inputs if they are valid or not

Compute the result of this equation: d = a|b| + (log10c) sin((theta*PI)/180)

Give the output of d

Give output of ceil(d) and floor(d)

Use built-in library function from C++ header files. Include

See the description of the cmath functions in the textbook to see what type of input they can take and what type they cannot take

Sample code given

Sample output given

Run your program for the following input and given screen picture for each of them

a b c theta

10 -10 10 10

-10 0.5 -10 -10

-10 -10 1 10

10 10 0.5 0.5

10 10 10 10

1 1 1 1

Put your code here:

Put your screen picture here

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 And Expert Systems Applications 24th International Conference Dexa 2013 Prague Czech Republic August 2013 Proceedings Part 2 Lncs 8056

Authors: Hendrik Decker ,Lenka Lhotska ,Sebastian Link ,Josef Basl ,A Min Tjoa

2013th Edition

3642401724, 978-3642401725

More Books

Students also viewed these Databases questions