Answer:
The solution code is written in Java.
- Scanner input = new Scanner(System.in);
- System.out.print("Enter operator: ");
- String operator = input.nextLine();
- System.out.print("Enter first integer: ");
- int num1 = input.nextInt();
- System.out.print("Enter second integer: ");
- int num2 = input.nextInt();
-
-
- int result = 0;
-
- switch(operator){
- case "+":
- result = num1 + num2;
- break;
- case "-":
- result = num1 - num2;
- break;
- case "*":
- result = num1 * num2;
- break;
- case "/":
- result = num1 / num2;
- break;
- default:
- System.out.println("Invalid operator");
-
- }
-
- System.out.println(result);
Explanation:
To ask for the user input for two whole numbers and an operator, we can use Java Scanner class object. Since the input operator is a string, we can use nextLine() method to get the operator string (Line 3). We use nextInt() method to get whole number input (Line 5 & 7).
Next we use the switch keyword and pass the operator into the switch structure to determine which case statement should be executed. For example, if the input operator is "*" the statement "<em>result = num1 * num2;</em>
" will run and multiply <em>num1</em> with <em>num2. </em>
Explanation:
The three-second rule is recommended for passenger vehicles during ideal road and weather conditions. Slow down and increase your following distance even more during adverse weather conditions or when visibility is reduced. Also increase your following distance if you are driving a larger vehicle or towing a trailer.
Answer:
2.83 kg
Explanation:
Given:
Volume, V = 0.8 m³
gage pressure, P = 200 kPa
Absolute pressure = gage pressure + Atmospheric pressure
= 200 + 101 = 301 kPa = 301 × 10³ N/m²
Temperature, T = 23° C = 23 + 273 = 296 K
Now,
From the ideal gas equation
PV = mRT
Where,
m is the mass
R is the ideal gas constant = 287 J/Kg K. (for air)
thus,
301 × 10³ × 0.8 = m × 287 × 296
or
m = 2.83 kg
Answer:
The answer is c-resistance
Answer:
Explanation:
In a particular application involving airflow over a heated surface, the boundary layer temperature distribution, T(y), may be approximated as:
[ T(y) - Ts / T∞ - Ts ] = 1 - e^( -Pr (U∞y / v) )
where y is the distance normal to the surface and the Prandtl number, Pr = Cpu/k = 0.7, is a dimensionless fluid property. a.) If T∞ = 380 K, Ts = 320 K, and U∞/v = 3600 m-1, what is the surface heat flux? Is this into or out of the wall? (~-5000 W/m2 , ?). b.) Plot the temperature distribution for y = 0 to y = 0.002 m. Set the axes ranges from 380 to 320 for temperature and from 0 to 0.002 m for y. Be sure to evaluate properties at the film temperature.