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
A large class with 1,000 students took a quiz consisting of ten questions. To get an A, students needed to get 9 or 10 questions
VMariaS [17]

Answer:

a. 0.11

b. 110 students

c. 50 students

d. 0.46

e. 460 students

f. 540 students

g. 0.96

Explanation:

(See attachment below)

a. Probability that a student got an A

To get an A, the student needs to get 9 or 10 questions right.

That means we want P(X≥9);

P(X>9) = P(9)+P(10)

= 0.06+0.05=0.11

b. How many students got an A on the quiz

Total students = 1000

Probability of getting A = 0.11 ---- Calculated from (a)

Number of students = 0.11 * 1000

Number of students = 110 students

So,the number of students that got A is 110

c. How many students did not miss a single question

For a student not to miss a single question, then that student scores a total of 10 out of possible 10

P(10) = 0.05

Total Students = 1000

Number of Students = 0.05 * 1000

Number of Students = 50 students

We see that 5

d. Probability that a student pass the quiz

To pass, a student needed to get at least 6 questions right.

So we want P(X>=6);

P(X>=) =P(6)+P(7)+P(8)+P(9)+P(10)

=0.08+0.12+0.15+0.06+0.05=0.46

So, the probability of a student passing the quiz is 0.46

e. Number of students that pass the quiz

Total students = 1000

Probability of passing the quiz = 0.46 ----- Calculated from (d)

Number of students = 0.46 * 1000

Number of students = 460 students

So,the number of students that passed the test is 460

f. Number of students that failed the quiz

Total students = 1000

Total students that passed = 460 ----- Calculated from (e)

Number of students that failed = 1000 - 460

Number of students that failed = 540

So,the number of students that failed is 540

g. Probability that a student got at least one question right

This means that we want to solve for P(X>=1)

Using the complement rule,

P(X>=1) = 1 - P(X<1)

P(X>=1) = 1 - P(X=0)

P(X>=1) = 1 - 0.04

P(X>=1) = 0.96

7 0
3 years ago
1 UNREAD MESSAGE
myrzilka [38]

Answer:

triangular trade

Explanation:

triangular trade

7 0
2 years ago
A freeway is being designed for a location in rolling terrain. The expected free-flow speed is 55 mi/h. During the peak hour, it
balu736 [363]

Answer:

3.

Explanation:

We start calcualting the factor for heavy-vehicle, that is,

f_{HV} = \frac{1}{1+P_T(E_T-1)+P_R(E_R-1)}

E_T = 2.5 for rolling terrain, so, replacing,

f_{HV} = \frac{1}{1+0.18(2.5-1)+0}

f_{HV} = 0.7874

We calculate the number of lanes by using the relation as follow:

N=\frac{V}{\upsilon_p PHF f_{HV} f_p}

N=\frac{2700}{1915*0.88*0.7874*1}

N= 2.035

In this way the necessary number of lanes is 3.

Note: To calculate \upsilon_p you need to consult the Exhibit 23-2

in 'Highway capacity Manual' for 55mph and the LOS D criteria.

6 0
4 years ago
The minimum fresh air requirement of a residential building is specified to be 0.35 air changes per hour (ASHRAE, Standard 62, 1
ra1l [238]

Answer:

3150 L/min

Explanation:

The volume of the room is the product of the height of the room and its area. It is given as:

Volume (V) = height (h) × Area (A)

V = h × A

Height = 2.7 m, Area = 200 m². Hence:

V = h × A = 2.7 × 200 = 540 m³

The flow capacity (\dot {V}) is given by

\dot {V}=ACH*Volume\ of\ room

ACH = air changes per hour = 0.35

\dot {V}=ACH*Volume\ of\ room\\\\\dot {V}=0.35*540\\\\\dot {V}=189\ m^3/h

But 1 m³ = 1000 L, 1 hr = 60 min

\dot{V}=189\ m^3/h=\frac{189\ m^3*\frac{1000\ L}{1\ m^3} }{1\ h*\frac{60\ min}{1\ h} } =3150\ L/min\\\\\dot{V}=3150 \ L/min

6 0
4 years ago
An ocean thermal energy conversion system is being proposed for electric power generation. Such a system is based on the standar
Dennis_Churaev [7]

Answer:

a) the heat exchanger area required for the evaporator is 11178.236 m²

b) the required flow rate is 1993630.38 kg/s

Explanation:

Given the data in the question;

Water temperature near the surface = 300 K

temperature at reasonable depths ( cold ) = 280 K

power plant output W' = 2 MW

efficiency η = 3% = 0.03

we know that; efficiency η = W'_{power-out / Q_{supplied

we substitute

0.03 = 2 / Q_{supplied

Q_{supplied = 2 / 0.03

Q_{supplied = 66.667 MW = 66.667 × 10⁶ Watt

Th_{in = 300 K       Th_{out = 292 K

Tc_{in = 290 K       Tc_{out = 290 K    

Now, Heat transfer in evaporator;

Q = UA( LMTD )

so

LMTD = (ΔT₁ - ΔT₂) / ln( ΔT₁ / ΔT₂ )

first we get ΔT₁ and ΔT₂

ΔT₁ = Th_{in - Tc_{out  = 300 - 290 = 10 K

ΔT₂ = Th_{out - Tc_{in  = 292 - 290 = 2 K

so we substitute into our equation;

LMTD = (10 - 2) / ln( 10 / 2 )

LMTD = 8 / ln( 5 )

LMTD = 8 / 1.6094379

LMTD = 4.97

a) Heat transfer Area will be;

Q_H = UA( LMTD )

we substitute

66.667 × 10⁶ = 1200 × A × 4.97

66.667 × 10⁶  = 5964 × A

A = (66.667 × 10⁶) / 5964

A = 11178.236 m²

Therefore, the heat exchanger area required for the evaporator is 11178.236 m²

b) Flow rate  

we know that;

Q_H = m'C_P( T_{in - T_{out )  

specific heat capacity of water Cp = 4.18 (kJ/kg∙°C)

we substitute

66.667 × 10⁶ = m' × 4.18 × ( 300 - 292 )

66.667 × 10⁶ = m' × 33.44

m' = ( 66.667 × 10⁶ ) / 33.44

m' = 1993630.38 kg/s

Therefore, the required flow rate is 1993630.38 kg/s

7 0
3 years ago
Other questions:
  • A 356 cast aluminum test bar is tested in tension. The initial gage length as marked on the sample is 50mm and the initial diame
    9·1 answer
  • If the specific surface energy for magnesium oxide is 1.0 J/m2 and its modulus of elasticity is (225 GPa), compute the critical
    7·1 answer
  • What is ductile to brittle transition temperature (DBTT)?
    9·1 answer
  • A company, studying the relation between job satisfaction and length of service of employees, classified employees into three le
    14·1 answer
  • ______________ help protect the lower legs and feet from heat hazards like molten metal and welding sparks. A) Safety shoesB) Le
    7·1 answer
  • Does anyone know obamas last name???? please help its for a friend I swear!!!111!!11!
    8·1 answer
  • Problem 1. Network-Flow Programming (25pt) A given merchandise must be transported at a minimum total cost between two origins (
    15·1 answer
  • Microstructures are microscopic additions or forms in a system.<br> True<br> O False
    7·2 answers
  • Compression is maintained during combustion because on top of the motor is a _____
    7·1 answer
  • 100000000000x1000000000000=?
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!