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
Hatshy [7]
3 years ago
8

Read a 4 character number. Output the result in in the following format, Input 9873, Output 3 *** 7 ******* 8 ******** 9 *******

** If one of the numbers is not a digit, then put a ? mark Input = 98a3, Output 3 *** a ? 8 ******** 9 ********* Prompt the user before the input with, cout<<"Create a histogram chart."<
Engineering
1 answer:
Rus_ich [418]3 years ago
4 0

Answer:

#include <iostream>

using namespace std;

int main()

{

 char numbers[4];

 

 cout<<"Create a histogram chart."<<endl;

 cout<<"Enter your number as 4 characters: ";

 

 cin >> numbers;

 

 for (int i=3; i>=0; i--) {

   int ascii_value = numbers[i];

   int number = numbers[i] - '0';

   

   if (ascii_value >=48 && ascii_value <=57) {

       cout << number;

       

       for (int j=number-1; j>=0; j--) {

           cout << "*";    

       }

   }

   else {

       cout << "a ?";    

   }

   

   cout << endl;

 }

}



Explanation:

Declare a character array with length 4,

Ask user to enter values,

Create a nested for loop; first loop <u>holds the values and their ASCII values for each character</u>,

<u>Check the ASCII values</u> for each character, if they are <u>between 48 and 57</u>, that means they are numbers. In this case, print the number and go to the inner loop and print the stars accordingly,

If ASCII values are not in the range, print a ?,

Go to the new line after each character

You might be interested in
How can you do this 5.2.4: Rating?
gizmo_the_mogwai [7]

Answer:

whats the question

Explanation:

5 0
3 years ago
Burn rate can be affected by: A. Variations in chamber pressure B. Variations in initial grain temperature C. Gas flow velocity
Digiron [165]

Answer: D) All of the above

Explanation:

Burn rate can be affected by all of the above reasons as, variation in chamber pressure because the pressure are dependence on the burn rate and temperature variation in initial gain can affect the rate of the chemical reactions and initial gain in the temperature increased the burning rate. As, gas flow velocity also influenced to increasing the burn rate as it flowing parallel to the surface burning. Burn rate is also known as erosive burning because of the variation in flow velocity and chamber pressure.

4 0
3 years ago
Radioactive wastes are temporarily stored in a spherical container, the center of which is buried a distance of 10 m below the e
a_sh-v [17]

Answer:

Outside temperature =88.03°C

Explanation:

Conductivity of air-soil from standard table

   K=0.60 W/m-k

To find temperature we need to balance energy

Heat generation=Heat dissipation

Now find the value

We know that for sphere

q=\dfrac{2\pi DK}{1-\dfrac{D}{4H}}(T_1-T_2)

Given that q=500 W

so

500=\dfrac{2\pi 2\times .6}{1-\dfrac{2}{4\times 10}}(T_1-25)

By solving that equation we get

T_2=88.03°C

So outside temperature =88.03°C

6 0
3 years ago
Consider a W21x93. Determine the moment capacity of the beam. Assume the compression flange is not laterally braced and that the
OLga [1]

Answer:

The answer is "828.75"

Explanation:

Please find the correct question:

For W21x93 BEAM,

Z_x = 221.00 in^3 \\\\\to \frac{b_t}{2t_f} =4.53\\\\\to \frac{h}{t_w}=32.3

For A992 STREL,

F_y= 50\  ks

Check for complete section:

\to \frac{b_t}{2t_f} =4.53 < \frac{65}{\sqrt{f_y = 9.19}}\\\\\to \frac{h}{t_w} =32.3 < \frac{640}{\sqrt{f_y = 90.5}}

Design the strength of beam =\phi_b Z_x F_y\\\\

                                                =0.9 \times 221 \times 50\\\\=9945 \ in \ \ kips\\\\=\frac{9945}{12}\\\\= 828.75 \ft \ kips \\

8 0
3 years ago
Consider a very long, cylindrical fin. The temperature of the fin at the tip and base are 25 °C and 50 °C, respectively. The dia
nekit [7.7K]

Answer:

98°C

Explanation:

Total surface area of cylindrical fin = πr² + 2πrl , r = 0.015m; l= 0.1m; π =22/7

22/7*(0.015)² + 22/7*0.015*0.1 = 7.07 X 10∧-4 + 47.1 X 10∧-4 = (54.17 X 10∧-4)m²

Temperature change, t = (50 - 25)°C = 25°C = 298K

Hence, Temperature =  150 X (54.17 X 10∧-4) X 298/123 = 242.14/124 = 2.00K =

∴ Temperature change = 2.00K

But temperature, T= (373 - 2)K = 371 K

In °C = (371 - 273)K = 98°C         

7 0
3 years ago
Other questions:
  • Magnesium sulfate has a number of uses, some of which are related to the ability of the anhydrate form to remove water from air
    15·1 answer
  • A composite wall is composed of 20 cm of concrete block with k = 0.5 W/m-K and 5 cm of foam insulation with k = 0.03 W/m-K. The
    13·1 answer
  • The button on the _ valve should be held when pressure bleeding the brakes
    8·1 answer
  • A moving-coil instrument, which gives full-scale deflection with 0.015 A has a copper coil having resistance of 1.5 Ohm at 15°C
    7·1 answer
  • Please help me:<br> Use the Node analysis to find the power of all resistors
    9·1 answer
  • What is meant by the acronym ISO
    15·1 answer
  • If my current directory is ‘AR’ write the path for my current directory
    5·1 answer
  • You filled a balloon that has a volume of 45 cm3 with helium gas. What is the volume of the helium gas?
    13·1 answer
  • Discuss in detail the manners of interaction with opposite gender
    10·1 answer
  • A lightbulb has a fixed negative and positive connector. You cannot swap positive and negative sides of a lightbulb in a circuit
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!