1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
yawa3891 [41]
3 years ago
12

Write a do-while loop that continues to prompt a user to enter a number less than 100, until the entered number is actually less

than 100. End each prompt with a newline. Ex: For the user input 123, 395, 25, the expected output is:
Enter a number (<100):
Enter a number (<100):
Enter a number (<100):
Your number < 100 is: 25
c++

#include
using namespace std;

int main() {
int userInput = 0;

do
cout << "Your number < 100 is: " << userInput << endl;

return 0;
}
Engineering
1 answer:
chubhunter [2.5K]3 years ago
8 0

Answer:

#include <iostream>//including iostream library to use functions such as cout and cin

using namespace std;

int main() {

int userInput = 0;

do

{

 cout << "Enter a number < 100: " ;

 cin >> userInput;

 if (userInput < 100)//condition if number is less than 100

 {

  cout << "Your number < 100 is: " << userInput << endl;

 }

} while (userInput > 100);//do while loop condition

return 0;

}

Explanation:

A do-while loop executes regardless in the first iteration. Once it has run through the first iteration, it checks if the condition is being met. If, the condition is TRUE, the loop begins the second iteration. If FALSE, the loop exits. In this case, the condition is the userInput. after the first iteration, lets say the userInput is 120, the condition userInput > 100 is true.Therefore, the loop will run again until eventually the number is less than hundred, lets say 25. In that case the condition would be 25 > 100, which would be false, so the loops will break.

You might be interested in
Request for proposal (RFP) is a type of document that contains the information and proposals mostly through the bidding process.
Art [367]

Answer:

Answer to the following is as follows;

Explanation:

A request for proposal is a documentation that invites prospective contractors to submit business opportunities to an agency or corporation interested in procuring a commodities, product, or valuable resource through a bid procedure.

A request for proposal (RFP) is a commercial document that introduces a project, defines it, and invites eligible contractors to compete on its completion.

8 0
3 years ago
Nothing. i have nothing to say but that. other than that im good. :))))
ohaa [14]

Answer:

aw good <3

Explanation:

4 0
3 years ago
Three tool materials (high-speed steel, cemented carbide, and ceramic) are to be compared for the same turning operation on a ba
Tpy6a [65]

Answer:

Among all three tools, the ceramic tool is taking the least time for the production of a batch, however, machining from the HSS tool is taking the highest time.

Explanation:

The optimum cutting speed for the minimum cost

V_{opt}= \frac{C}{\left[\left(T_c+\frac{C_e}{C_m}\right)\left(\frac{1}{n}-1\right)\right]^n}\;\cdots(i)

Where,

C,n = Taylor equation parameters

T_h =Tool changing time in minutes

C_e=Cost per grinding per edge

C_m= Machine and operator cost per minute

On comparing with the Taylor equation VT^n=C,

Tool life,

T= \left[ \left(T_t+\frac{C_e}{C_m}\right)\left(\frac{1}{n}-1\right)\right]}\;\cdots(ii)

Given that,  

Cost of operator and machine time=\$40/hr=\$0.667/min

Batch setting time = 2 hr

Part handling time: T_h=2.5 min

Part diameter: D=73 mm =73\times 10^{-3} m

Part length: l=250 mm=250\times 10^{-3} m

Feed: f=0.30 mm/rev= 0.3\times 10^{-3} m/rev

Depth of cut: d=3.5 mm

For the HSS tool:

Tool cost is $20 and it can be ground and reground 15 times and the grinding= $2/grind.

So, C_e= \$20/15+2=\$3.33/edge

Tool changing time, T_t=3 min.

C= 80 m/min

n=0.130

(a) From equation (i), cutting speed for the minimum cost:

V_{opt}= \frac {80}{\left[ \left(3+\frac{3.33}{0.667}\right)\left(\frac{1}{0.13}-1\right)\right]^{0.13}}

\Rightarrow 47.7 m/min

(b) From equation (ii), the tool life,

T=\left(3+\frac{3.33}{0.667}\right)\left(\frac{1}{0.13}-1\right)\right]}

\Rightarrow T=53.4 min

(c) Cycle time: T_c=T_h+T_m+\frac{T_t}{n_p}

where,

T_m= Machining time for one part

n_p= Number of pieces cut in one tool life

T_m= \frac{l}{fN} min, where N=\frac{V_{opt}}{\pi D} is the rpm of the spindle.

\Rightarrow T_m= \frac{\pi D l}{fV_{opt}}

\Rightarrow T_m=\frac{\pi \times 73 \times 250\times 10^{-6}}{0.3\times 10^{-3}\times 47.7}=4.01 min/pc

So, the number of parts produced in one tool life

n_p=\frac {T}{T_m}

\Rightarrow n_p=\frac {53.4}{4.01}=13.3

Round it to the lower integer

\Rightarrow n_p=13

So, the cycle time

T_c=2.5+4.01+\frac{3}{13}=6.74 min/pc

(d) Cost per production unit:

C_c= C_mT_c+\frac{C_e}{n_p}

\Rightarrow C_c=0.667\times6.74+\frac{3.33}{13}=\$4.75/pc

(e) Total time to complete the batch= Sum of setup time and production time for one batch

=2\times60+ {50\times 6.74}{50}=457 min=7.62 hr.

(f) The proportion of time spent actually cutting metal

=\frac{50\times4.01}{457}=0.4387=43.87\%

Now, for the cemented carbide tool:

Cost per edge,

C_e= \$8/6=\$1.33/edge

Tool changing time, T_t=1min

C= 650 m/min

n=0.30

(a) Cutting speed for the minimum cost:

V_{opt}= \frac {650}{\left[ \left(1+\frac{1.33}{0.667}\right)\left(\frac{1}{0.3}-1\right)\right]^{0.3}}=363m/min [from(i)]

(b) Tool life,

T=\left[ \left(1+\frac{1.33}{0.667}\right)\left(\frac{1}{0.3}-1\right)\right]=7min [from(ii)]

(c) Cycle time:

T_c=T_h+T_m+\frac{T_t}{n_p}

T_m= \frac{\pi D l}{fV_{opt}}

\Rightarrow T_m=\frac{\pi \times 73 \times 250\times 10^{-6}}{0.3\times 10^{-3}\times 363}=0.53min/pc

n_p=\frac {7}{0.53}=13.2

\Rightarrow n_p=13 [ nearest lower integer]

So, the cycle time

T_c=2.5+0.53+\frac{1}{13}=3.11 min/pc

(d) Cost per production unit:

C_c= C_mT_c+\frac{C_e}{n_p}

\Rightarrow C_c=0.667\times3.11+\frac{1.33}{13}=\$2.18/pc

(e) Total time to complete the batch=2\times60+ {50\times 3.11}{50}=275.5 min=4.59 hr.

(f) The proportion of time spent actually cutting metal

=\frac{50\times0.53}{275.5}=0.0962=9.62\%

Similarly, for the ceramic tool:

C_e= \$10/6=\$1.67/edge

T_t-1min

C= 3500 m/min

n=0.6

(a) Cutting speed:

V_{opt}= \frac {3500}{\left[ \left(1+\frac{1.67}{0.667}\right)\left(\frac{1}{0.6}-1\right)\right]^{0.6}}

\Rightarrow V_{opt}=2105 m/min

(b) Tool life,

T=\left[ \left(1+\frac{1.67}{0.667}\right)\left(\frac{1}{0.6}-1\right)\right]=2.33 min

(c) Cycle time:

T_c=T_h+T_m+\frac{T_t}{n_p}

\Rightarrow T_m=\frac{\pi \times 73 \times 250\times 10^{-6}}{0.3\times 10^{-3}\times 2105}=0.091 min/pc

n_p=\frac {2.33}{0.091}=25.6

\Rightarrow n_p=25 pc/tool\; life

So,

T_c=2.5+0.091+\frac{1}{25}=2.63 min/pc

(d) Cost per production unit:

C_c= C_mT_c+\frac{C_e}{n_p}

\Rightarrow C_c=0.667\times2.63+\frac{1.67}{25}=$1.82/pc

(e) Total time to complete the batch

=2\times60+ {50\times 2.63}=251.5 min=4.19 hr.

(f) The proportion of time spent actually cutting metal

=\frac{50\times0.091}{251.5}=0.0181=1.81\%

3 0
4 years ago
10. An engineer is designing a total hip implant. She intends to make the femoral stem out of titanium because it forms a good i
creativ13 [48]

Answer:

Yes. She should be worried about corrosion. The 18-8 stainless exhibits intergranular corrosion due to high (0.08%) carbon content and gross pitting due to low molybdenum content.

Explanation: lol

8 0
4 years ago
What is noise definition in physics<br><br>​
Bess [88]

Answer:

Noise or sound is the energy produced by sounding object which can be felt by our hearing organs .

Explanation:

Noise is produced by vibration in a body.

4 0
3 years ago
Other questions:
  • Many people use microwave ovens to cook their food. Which option is best described as an engineering endeavor related to microwa
    9·2 answers
  • How does the modern Diesel engine achieve higher power output without the use of higher compression ratio?
    5·1 answer
  • A steady state and continuous separator has a total feed rate of 100. kg/h of a 55.0 wt. % benzene mixture. The balance is tolue
    7·1 answer
  • What did the romans adopt from the Greek representation of the human art form
    15·1 answer
  • Tim was recently released from his last job. He was very rigid and would not change a product design once he began a project. He
    7·1 answer
  • As shown, a load of mass 10 kg is situated on a piston of diameter D1 = 140 mm. The piston rides on a reservoir of oil of depth
    9·1 answer
  • Air in a 10 ft3 cylinder is initially at a pressure of 10 atm and a temperature of 330 K. The cylinder is to be emptied by openi
    10·2 answers
  • The concrete canoe team does some analysis on their design and calculates that they need a compressive strength of 860 psi. They
    15·1 answer
  • Multimeter and the LCD is showing Hz. What's she measuring?
    11·1 answer
  • How much does it cost to replace a roof on a 2,200 square foot house.
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!