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
You are about to perform PMCS on your M1114? What resource should you use for the procedures and instructions for performing PMC
aniked [119]

The resources and instructions that should be used for the procedures of performing PMCS are:

  1. Operator's manuals
  2. Safety cautions and warnings.
  3. Fording kit
  4. Heating and cooling systems.

<h3>What is PMCS?</h3>

PMCS is an acronym for preventive maintenance checks and services and it can be defined as the maintenance, checks, and services that are typically performed before, during, and after the use of any type of military equipment such as:

  • M1114
  • M1151
  • M1123

Basically, the resources and instructions that should be used for the procedures of performing PMCS are:

  1. Operator's manuals
  2. Safety cautions and warnings.
  3. Fording kit
  4. Heating and cooling systems.

Read more on PMCS here: brainly.com/question/15720250

#SPJ1

4 0
1 year ago
Salvage ethnography is the effort to ensure that ethnography remains an important part of anthropology. recording of linguistic
fenix001 [56]

Answer:

                D

Explanation:

                            D

6 0
3 years ago
What is electricity defined as
antoniya [11.8K]

Answer:

Exact answer: a form of energy resulting from the existence of charged particles (such as electrons or protons), either statically as an accumulation of charge or dynamically as a current.

4 0
3 years ago
Why doesn’t the servant kill the child oedipus as he was ordered to do
Anni [7]
The Servant does not kill the child Oedipus as he was ordered to do because "He pitied the child" based on the Oedipus Rex story. The servant was ordered to kill the child because of the prophecy that predicted King Laius' death. The king already had attempted to hurt Oedipus by piercing Oedipus's ankle. However, the servant did not finish the job and he rather saved the baby Oedipus.
6 0
3 years ago
True or false a critique of hazwoper incidents that have occurred in the past year should not be included in hazwoper 8 hour ref
Jobisdone [24]

Answer:

False

Explanation:

No matter if something happened in the past year or so, it still should be included for safety reasons so it wont happen again

7 0
3 years ago
Other questions:
  • 7 Single-use earplugs require a professional fitting before they can be used.
    10·2 answers
  • A rectangular concrete beam has dimensions b=16 in. and h=30 in. The location of the Gr. 60 reinforcing bars, which are placed a
    15·1 answer
  • If the head loss in a 30 m of length of a 75-mm-diameter pipe is 7.6 m for a given flow rate of water, what is the total drag fo
    13·1 answer
  • Hey, can anyone tell me if Igneous rock is good to build on? Cheers!
    6·1 answer
  • 8. Describe and correct the error in stating the domain. Xf * (x) = 4x ^ (1/2) + 2 and g(x) = - 4x ^ (1/2) The domain of (f + g)
    6·1 answer
  • Part of the basic procedures is the vehicle check. What does that mean?
    7·1 answer
  • Why dues brainy exist as a learning platform when it is just full of answers and you won't learn anything?
    8·1 answer
  • The amplitudes of the displacement and acceleration of an unbalanced motor were measured to be 0.15 mm and 0.6*g, respectively.
    12·1 answer
  • The electron beam in a TV picture tube carries 1015 electrons per second. As a design engineer, determine the voltage needed to
    8·1 answer
  • What type of engineer makes sure equipment is safe and operational
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!