Write a program to calculate the K value using if else condition If P value is more than 9 then K = M/2 - VP +C If P value is less than or equal to 9 then K = M2 + VP+C Where C is a constant with value 1.7

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter3: Assignment, Formatting, And Interactive Input
Section3.2: Formatting Numbers For Program Output
Problem 10E
icon
Related questions
Question
Done CLA_1.docx_9f2c656d05ce0af2d...
EECP1290: Computer Programming for Engineering-CLA#1
Write a program to calculate the K value using if else condition
If P value is more than 9 then
K = M/2 - VP+C
If P value is less than or equal to 9 then
K = M2 + P+C
Where C is a constant with value 1.7
Sample output:
Enter p value:16
Enter M value:4
p, M and K values are:16.000000 4.000000 -0.300000
Sample output:
Enter p value:9
Enter M value:4
p, M and K values are:9.000000 4.000000 6.700000
Transcribed Image Text:Done CLA_1.docx_9f2c656d05ce0af2d... EECP1290: Computer Programming for Engineering-CLA#1 Write a program to calculate the K value using if else condition If P value is more than 9 then K = M/2 - VP+C If P value is less than or equal to 9 then K = M2 + P+C Where C is a constant with value 1.7 Sample output: Enter p value:16 Enter M value:4 p, M and K values are:16.000000 4.000000 -0.300000 Sample output: Enter p value:9 Enter M value:4 p, M and K values are:9.000000 4.000000 6.700000
Expert Solution
steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Knowledge Booster
Binary numbers
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage