Answer:
I will code in JAVA.
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
boolean tallEnough;
boolean oldEnough;
Scanner input = new Scanner(System.in);
tallEnough = input.nextBoolean();<em> //wait the input for tallEnough</em>
oldEnough = input.nextBoolean(); <em>//wait the input for OldEnough</em>
if(tallEnough && oldEnough){
System.out.print(true);
} else {
System.out.print(false);
}
}
}
Explanation:
First, to accept user inputs you have to import the class Scanner. Then declare both variables before allowing the user to set input values for both boolean variables.
In the if-else statement checks if both variables are true, then prints true. Another case prints always false.
Answer:
3 years of study - Bachelor's degree
2 years of research - Master's degree
3 years of research to earn a PhD
So, On total it would take 8 years!
<u>Explanation:</u>
Remember, an algorithm in simple words means a set of instructions or steps to be followed in other to solve a problem.
Note, to decide which commute is cheaper, it means the output of the algorithm should be the cheaper way to commute.
Using pseudocode do the following;
- determine the inputs and outputs of the problem
- arrange the identified problem into micro-tasks
- describe each micro-tasks in the pseudocode
- Test the pseudocode by solving the problem.
B.Interact more with people from different backgrounds. this is correct because that would help people get to know each other better.
Hope this helps:)