Most metals weaken as temperature increases. The Ultimate Tensile Strength (UTS)
ID: 3889689 • Letter: M
Question
Most metals weaken as temperature increases. The Ultimate Tensile Strength (UTS) of most metals is accurately predicted by the following equation
where T is the current temperature (degrees Celsius) and EXP is a real number based on the type of metal. UTS is expressed as a value in the range 0.0 to 1.0, where 1.0 means the metal is at full strength, and 0.0 means the metal has no strength whatsoever. You can think of UTS as a percentage: 1.0 = 100%, and 0.0 = 0%.
For example, a particular type of stainless steel has an EXP value of 2.0. When the temperature reaches 300 degrees (Celsius), this type of stainless steel has a UTS of 0.91, or 91%.
Write a complete C++ program that inputs the EXP value for a particular metal (as a real number), and outputs the UTS for the temperatures 100, 200, 300, ..., 1000. Example: given the input value
your program should output
Explanation / Answer
PROGRAM CODE:
#include <iostream>
#include <cmath>
using namespace std;
int main() {
double EXP, UTS;
cout<<"Enter EXP value: ";
cin>>EXP;
//looping through each temperature
for(int i=100; i<=1000; i+=100)
{
UTS = 1.0 - pow((i/1000.0), EXP);
cout<<endl<<UTS;
}
return 0;
}
OUTPUT:
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.