1 - A certain grade of steel is graded according to the following conditions: a. Hardness must be greater than 50 b. Carbon content must be less than 0.7 c. Tensile strength must be greater than 5600 The grades are as follows: Grade is 10 if all three conditions are met. Grade is 9 if conditions (i) and (ii) are met. Grade is 8 if conditions (ii) and (iii) are met. Grade is 7 if conditions (i) and (iii) are met. Grade is 6 if only one condition is met. Grade is 5 if none of the conditions are met. Write a program, which will require the user to give values of hardness, carbon content and tensile strength of the steel under consideration and output the grade of the steel.

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter6: User-defined Functions
Section: Chapter Questions
Problem 14PE
icon
Related questions
Question

1 - A certain grade of steel is graded according to the following conditions: a. Hardness must be greater than 50 b. Carbon content must be less than 0.7 c. Tensile strength must be greater than 5600 The grades are as follows:

Grade is 10 if all three conditions are met.

Grade is 9 if conditions (i) and (ii) are met.

Grade is 8 if conditions (ii) and (iii) are met.

Grade is 7 if conditions (i) and (iii) are met.

Grade is 6 if only one condition is met.

Grade is 5 if none of the conditions are met.

Write a program, which will require the user to give values of hardness, carbon content and tensile strength of the steel under consideration and output the grade of the steel.

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Topological Sort
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++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Operations Research : Applications and Algorithms
Operations Research : Applications and Algorithms
Computer Science
ISBN:
9780534380588
Author:
Wayne L. Winston
Publisher:
Brooks Cole