Answer:
public class Main
{
public static void main(String[] args) {
int userNum = 40;
while(userNum > 1){
userNum /= 2;
System.out.print(userNum + " ");
}
}
}
Explanation:
*The code is in Java.
Initialize the userNum
Create a while loop that iterates while userNum is greater than 1. Inside the loop, divide the userNum by 2 and set it as userNum (same as typing userNum = userNum / 2;). Print the userNum
Basically, this loop will iterate until userNum becomes 1. It will keep dividing the userNum by 2 and print this value.
For the values that are smaller than 1 or even for 1, the program outputs nothing (Since the value is not greater than 1, the loop will not be executed).
Answer:
c. your friend can hash all possible options and discover your secret.
Explanation:
SHA-256 is a set of hash functions that was designed by the NSA. SHA-2 is considered an upgrade on the set that was its predecessor, SHA-1. A hash is a mathematical function that condenses data in a process of one-way encryption. SHA-256 creates hash algoritms that are considered irreversible and unique. However, one of the properties of hashing algorithms is determinism, which means that any computer in the world would be able to compute a particular hash and get the same answer.
Answer:
The pseudocode is as follows
1. Input Steps
2. Input Day
3. Miles = Steps/2000
4. Calories = 65 * Miles
5. Print Calories
6. Stop
Explanation:
This line gets the number of steps for the day
1. Input Steps
This line gets the current day
2. Input Day
The line calculates number of miles
3. Miles = Steps/2000
This line calculates the calories lost
4. Calories = 65 * Miles
This line prints the calories lost
5. Print Calories
The pseudocode ends here
6. Stop
Answer:
Option A is correct
Explanation:
The right way to cite the Occupational Outlook Handbook's "How to Become a Dentist" web page is given below:
The first citation: Occupational Outlook Handbook.
The second citation: is on how to Become a Dentist."
The third citation: Bureau of Labor Statistics and US Department of Labor, 2012.
In conclusion the correct answer is option A.
Answer: (111000)2 = (70)8
Step by step solution:
Step 1: Write down the binary number
(111000)2
Group all the digits in sets of three starting from the LSB (far right). Add zeros to the left of the last digit if there aren't enough digits to make a set of three.
111 000
Step 2: Use the table below to convert each set of three into an octal digit. In this case,
111=7, 000=0.
So, the number 111000 in binary is equivalent to 70 in octal.
To convert from binary to octal use the following table:
Bin: 000 001 010 011 100 101 110 111
Octal: 0 1 2 3 4 5 6 7