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
Ronch [10]
3 years ago
7

Prompt the user to input an integer, a double, a character, and a string, storing each into separate variables. Then, output tho

se four values on a single line separated by a space. Enter integer: 99 Enter double: 3.77 Enter character: z Enter string: Howdy 99 3.77 z Howdy Extend to also output in reverse. (Submit for 1 point, so 3 points total). Enter integer 99 Enter double: 3.77 Enter character: z Enter string: Howdy 99 3.77 z Howdy Howdy z 3.77 99 Extend to cast the double to an integer, and output that integer Enter integer: 99 Enter double: 3.77 Enter character: z Enter string: Howdy 99 3.77 z Howdy Howdy z 3.77 99 3.77 cast to an integer is 3

Engineering
1 answer:
Likurg_2 [28]3 years ago
4 0

Answer:

See explanation

Explanation:

//Include the

//required header files.

#include <stdio.h>

//Define the

//main() function.

int main(void) {

//Declare the

//required variables.

char input_char;

int input_int;

double input_double;

char input_string[100];

//Prompt the user

//to enter an integer.

printf("Enter integer: ");

//Read and store

//the integer.

scanf("%d", &input_int);

//Prompt the user

//to enter a double value.

printf("Enter double: ");

//Read and store

//the double value.

scanf("%lf", &input_double);

//Prompt the user

//to enter a character.

printf("Enter character: ");

//Read and store

//the character.

scanf(" %c", &input_char);

//Prompt user to

//enter the string

printf("Enter string: ");

//Read and

//store the string.

scanf("%s", input_string);

//(1)

//Display the values.

printf("%d %lf %c %s\n",

input_int, input_double,

input_char, input_string);

//(2)

//Display the values

//in reverse order.

printf("%s %c %lf %d\n",

input_string, input_char,

input_double, input_int);

//(3)

//Cast the double to

//an integer and display it.

printf("%lf cast to an integer is %d",

input_double, (int)(input_double));

//Return from the

//main() function.

return 0;

}

You might be interested in
In order to fill a tank of 1000 liter volume to a pressure of 10 atm at 298K, an 11.5Kg of the gas is required. How many moles o
lesya [120]

Answer:

The molecular weight will be "28.12 g/mol".

Explanation:

The given values are:

Pressure,

P = 10 atm

  = 10\times 101325 \ Pa

  = 1013250 \ Pa

Temperature,

T = 298 K

Mass,

m = 11.5 Kg

Volume,

V = 1000 r

   = 1 \ m^3

R = 8.3145 J/mol K

Now,

By using the ideal gas law, we get

⇒ PV=nRT

o,

⇒ n=\frac{PV}{RT}

By substituting the values, we get

       =\frac{1013250\times 1}{8.3145\times 298}

       =408.94 \ moles

As we know,

⇒ Moles(n)=\frac{Mass(m)}{Molecular \ weight(MW)}

or,

⇒        MW=\frac{m}{n}

                   =\frac{11.5}{408.94}

                   =0.02812 \ Kg/mol

                   =28.12 \ g/mol

3 0
2 years ago
The combustion chamber has different shapes depending on the make and model of the engine. True or false
Alisiya [41]

Answer:

svdsdfdfsdfssdf

Explanation:

fsdsdfsdffsdsfdsdf

5 0
2 years ago
Sharon is designing a house in an area that receives a lot of rainfall all year. Which material should she use to stick the wood
kakasveta [241]

Explanation:

She is passionate about architecture, typography, and black & white film ... Since moving to Texas, I've heard a lot of people say, "If you don't like ... Oc, 3.74, 56, 80 ... Not only does the weather have to be clear to pour the concrete, but it ... system that goes within the slab) is complete, any additional rain will

4 0
3 years ago
Does the Diesel engine have engine knock or detonation problem? Why?
Luda [366]

Explanation:

Yes Diesel engine have problem of knocking.

We know that knocking is phenomenon in which suddenly large amount of power generates this large amount of power will cause the failure of diesel engine.

Actually when one set of fuel inject inside the cylinder to burn with already compressed air (in general up to 10-15 bar) then this fuel does not burn complete and accumulate inside the cylinder.After that second set of fuel inject inside the cylinder then that one set of fuel burns with second set of fuel and produces large amount of sudden power for engine and causes the breaks in the crank or connecting rod of engine.it leads to damage the engine.

6 0
2 years ago
What are the four causes of electrical faults?
Arada [10]

Answer:

Electrical faults are also caused due to human errors such as selecting improper rating of equipment or devices, forgetting metallic or electrical conducting parts after servicing or maintenance, switching the circuit while it is under servicing, etc.

Explanation:

6 0
2 years ago
Other questions:
  • The moisture in hot, humid, stagnant air surrounding a cold-water pipeline continually diffuses to the cold surface where it con
    14·1 answer
  • A compound machine contains three simple machines with IMAs of 2, 4 and 5, respectively. What is the overall ideal mechanical ad
    15·1 answer
  • Please help <br>.. <br>....<br> . .<br>....<br>...​
    13·1 answer
  • All of the following are categories for clutch covers except
    11·1 answer
  • Please read and answer each question carefully.
    9·1 answer
  • What are the mechanical properties of a geotextile that are of most importance when using it as a separator in an unpaved road s
    12·1 answer
  • Which type of engineer often works with radar, communication, and navigation systems? electrical engineer chemical engineer indu
    7·1 answer
  • Pleaseeee help me with this!!
    10·1 answer
  • Determine the minimum required wire radius assuming a factor of safety of 3 and a yield strength of 1500 MPa.
    15·1 answer
  • Somebody help me!! It’s due today
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!