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
How do Solar Engineers Help Humans?<br> (2 or more sentences please)
Gennadij [26K]
Solar engineers work in any number of areas of engineering products that help harness energy from the sun. They may research, design, and develop new products, or they may work in testing, production, or maintenance. They may collect and manage data to help design solar systems.
8 0
3 years ago
A compound machine contains three simple machines with IMAs of 2, 4 and 5, respectively. What is the overall ideal mechanical ad
anygoal [31]

Answer:

Overall ideal mechanical advantage of the machine = 40

Explanation:

Given:

Ideal mechanical advantage of three machine = 2, 4, 5

Find:

Overall ideal mechanical advantage of the machine

Computation:

Overall ideal mechanical advantage of the machine = 2 × 4× 5

Overall ideal mechanical advantage of the machine = 40

3 0
3 years ago
Fluorescent troffers are a type of _ lighting fixture
creativ13 [48]
The answer would be letter A
8 0
3 years ago
A steel rod, which is free to move, has a length of 200 mm and a diameter of 20 mm at a temperature of 15oC. If the rod is heate
kherson [118]

Explanation:

thermal expansion ∝L = (δL/δT)÷L ----(1)

δL = L∝L + δT ----(2)

we have δL = 12.5x10⁻⁶

length l = 200mm

δT = 115°c - 15°c = 100°c

putting these values into equation 1, we have

δL = 200*12.5X10⁻⁶x100

= 0.25 MM

L₂ = L + δ L

= 200 + 0.25

L₂ = 200.25mm

12.5X10⁻⁶ *115-15 * 20

= 0.025

20 +0.025

D₂ = 20.025

as this rod undergoes free expansion at 115°c, the stress on this rod would be = 0

3 0
3 years ago
What energy does a curcuit board run on
son4ous [18]

a curcuit board is powered by energy from the computers power soarce

6 0
3 years ago
Read 2 more answers
Other questions:
  • The lab technician you recently hired tells you the following: Boss, an undisturbed sample of saturated clayey soil was brought
    6·1 answer
  • A sludge pump pumps at a rate of 40 GPM. The raw sludge density is 4.5 percent solids. How many minutes per hour should the pump
    11·1 answer
  • The heat flux through a 1-mm thick layer of skin is 1.05 x 104 W/m2. The temperature at the inside surface is 37°C and the tempe
    8·1 answer
  • A triangular roadside channel is poorly lined with riprap. The channel has side slopes of 2:1 (H:V) and longitudinal slope of 2.
    9·1 answer
  • Why would Chris most likely conclude that he should seek help? A. He feels in control of his emotions even though people annoy h
    15·2 answers
  • The MOST common injury causing absence from work is
    7·2 answers
  • Technician A says that reinforcements may be made of plastic.
    6·1 answer
  • Explain the proper uses of shop equipment. (explain to me how to use 3 pieces of shop equipment.)
    7·1 answer
  • The gage pressure measured as 2.2 atm, the absolute pressure of gas is 3.2 bar. Please determine the local atmospheric pressure
    14·1 answer
  • If a fuel line is routed through a compartment parallel with an electrical wire bundle, the fuel line should be installed ______
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!