Question
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
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