Answer:
- import java.util.Scanner;
- import java.util.Random;
- public class Main {
-
- public static void main(String[] args) {
-
- Scanner input = new Scanner(System.in);
- Random rand = new Random();
-
- System.out.print("Enter number of questions you wish to practice: ");
- int n = input.nextInt();
-
- int i = 1;
- while(i <= n){
- int num1 = 1 + rand.nextInt(10);
- int num2 = 1 + rand.nextInt(10);
- int answer = num1 * num2;
- System.out.print("Question " + i + ": " + num1 + " x " + num2 + " = ");
- int response = input.nextInt();
-
- if(response == answer){
- System.out.println("Correct answer!");
- }
- else{
- System.out.println("Wrong answer. It should be " + answer);
- }
- i++;
- }
- }
- }
Explanation:
Firstly, we import Scanner and Random classes (Line 1-2) as we need to get user input for number of questions and generate random number in each question.
Next, create a Scanner and Random object (Line 7-8). Prompt user to input number of question and get the input using the Scanner object (Line 10-11).
Next create a while loop and set the condition to loop for n number of times (based on number of questions) (Line 14). In the loop, use Random object nextInt method to generate two integers between 1 -10 (Line 15-16). Prompt user to input an answer using the Scanner object (Line 18-19). If the response is matched with answer print a correct message (Line 21-22) other wise inform user they write a wrong answer and show the correct answer (Line 24-25).
Answer:
q = 0.1086 micro Coulombs
Explanation:
By Coulombs law, we have;

Where;
F = The electric force = 120 mgm
q₁ and q₂ = Charge
r = The separating distance = 30 cm = 0.3 m
k = 8.9876×10⁹ kg·m³/(s²·C²)
Where, q₁ and q₂, we have;

Whereby the force is the force of 120 milligram mass, we have;
0.00012 × 9.81 = 000011772 N

Substituting the values, we have;

q = 0.1086 micro Coulombs.
Answer:
It will be equivalent to 338.95 N-m
Explanation:
We have to convert 250 lb-ft to N-m
We know that 1 lb = 4.45 N
So foe converting from lb to N we have to multiply with 4.45
So 250 lb = 250×4.45 =125 N
And we know that 1 feet = 0.3048 meter
Now we have to convert 250 lb-ft to N-m
So 
So 250 lb-ft = 338.95 N-m
Answer:
To four significant digits = 2097 psi
Explanation:
<u>Applying the rule of thumb </u>
σ = Mc/I ---- ( 1 )
M = 1835 Ibf in , I/c = 0.875 in^3
∴ c/l = 1 / 0.875 = 1.1429
back to equation 1
σ = 1835 * 1.1429 = 2097.2215 psi
To four significant digits = 2097 psi
Known :
V1 = 10 L
T1 = 27°C
P1 = 12 atm
P2 = 3 atm
Solution :
Work done in the process
W = P1 • V1 ln (P1 / P2)
W = (12 atm) • (10 L) ln (12 / 3)
W = 166.35 L • atm
W = 168.55 kJ