Answer:
import java.util.Scanner;
public class CountByAnything
{
public static void main (String args[])
{
int beginning = 5;
int ending = 200;
Scanner s = new Scanner(System.in);
System.out.println("Enter the value to count by:");
int valueToCount = s.nextInt();
int counter = 0;
for(int i = beginning; i <= ending; i += valueToCount)
{
System.out.print(i + " ");
if((counter+1) % 10 == 0)
System.out.println();
counter++;
}
}
}
Explanation:
- Initialize the beginning and ending.
- Loop through the value of ending variable.
- Check if numbers per line is equal to ten and Increment the counter
.
Answer:
the difference in oil levels is 0.850 m
Explanation:
given data
specific gravity ρ = 0.72
pressure across P = 6 kPa = 6000 Pa
solution
we get here difference in oil levels h is
P = ρ × g × h .................1
here ρ = 0.72 × 1000 = 720 kg/m³
and g is 9.8
put here value in equation 1 and we get h
6000 = 720 × 9.8 × h
h =
h = 0.850 m
so the difference in oil levels is 0.850 m
Answer:
Mark me please as brainliest
Explanation:
A length of pipe will weigh the most when O A. part dimensions are such that the pipe is in the MMC. O B. the OD and ID are at the minimum allowable limit. OC. the OD and ID are at the maximum allowable limit. OD.part dimensions are such that the pipe is in the LMC
Answer:
The solution is written in Python
- binary = ""
- decimal = 13
- quotient = int(decimal / 2)
- remainder = decimal % 2
- binary = str(remainder) + binary
-
- while(quotient >0):
- decimal = int(decimal / 2)
- quotient = int(decimal / 2)
- remainder = decimal % 2
- binary = str(remainder) + binary
-
- print(binary)
Explanation:
Firstly, we declare a variable <em>binary</em> and initialize it with an empty string (Line 1). This <em>binary </em>is to hold the binary string.
Next, we declare variable <em>decimal, quotient </em>and<em> remainder </em>(Line 2-4). We assign a test value 13 to decimal variable and then get the first quotient by dividing decimal with 2 (Line 3). Then we get the remainder by using modulus operator, % (Line 4). The first remainder will be the first digit joined with the binary string (Line 5).
We need to repeat the process from Line 3-5 to get the following binary digits. Therefore create a while loop (Line 7) and set a condition that if quotient is bigger than 0 we keep dividing decimal by 2 and calculate the quotient and remainder and use the remainder as a binary digit and join it with binary string from the front (Line 9-11).
At last, we print the binary to terminal (Line 13).