Write a program which inputs a positive integer n and outputs an n line high triangle of '*' characters whose right-angle is in the bottom left corner. For example, if 5 is input the output should be
Your goal is to ask for the total bill and the amount that the user gave as a tip and determine based on a set of criteria whether that tip was a good amount.Create an algorithm, pseudocode and flowchart for this problem Code the solution for this problem prompt the user for the total bill amount.Prompt the user for the tip that they left Use the following equation to calculate the tip percentage: tip amount/total bill.Based on the tip percentage that was calculated, determine a message to display that will tell the user how good their tip was. Criteria: Tip less then 0 or greater than 1Tip is between 0 (including 0) and 0.05 (including 0.05)Tip is between 0.05 (not including 0.05) and 0.1 (including 0.1) Tip is between 0.1 (not including 0.1) and 0.2 (including 0.2) Tip is between 0.2 (not including 0.2) and 0.3 (including 0.30) Tip is greater than 0.3 Display the tip percentage that the user left along with a message as to how they rank as a tipper in an output box.
The average age to obtain a driver’s licence is 18. Write a Java program where the user enters his / her age. If the age is greater than or equal to 18, the program must display using JOptionPane the following message, “you are old enough to apply for a driver’s licence”, else display the following message, “you are not old enough to apply for a driver’s licence”.
Write a guessing game in java
where the computer generates a secret integer, and the user has to guess the secret integer. After every guess the program tells the user whether their number was too large or too small. Pring “Bingo” and the secret integer if the guess matches. At the end the number of tries needed should be printed.
Hints: How to generate secret number:
1. Import the class java.util.Random
2. Make the instance of the class Random, i.e., Random rand = new Random()
3. Use nextInt(upperbound) generates random numbers in the range 0 to upperbound-1
How to form a Pseudocode and Flowcharts for a Vending Machine
Create a do-while loop that asks the user to enter two numbers. The numbers should be added and the sum displayed. The loop should ask the user whether he or she wishes to perform the operation again. If so, the loop should repeat; otherwise it should terminate
Sample Run1
Enter two numbers: 3 15
Do you want another operation: Yes
Enter two numbers: 45 56
Do you want another operation: No
Output1: Sum = 119
Sample Run2
Enter two numbers: 33 150
Do you want another operation: Yes
Enter two numbers: -56 56
Do you want another operation: Yes
Enter two numbers: 58 15
Do you want another operation: Yes
Enter two numbers: 123 87
Do you want another operation: No
Output2: Sum = 466
Write a Java program that uses both recursive and non-recursive (iterative)
functions to print the nth value in the Fibonacci sequence by using these methods:
The output should be:
Enter value of i: 12
Fibonacci number 12 is 144. --> This is displayed through Iterative Method.
Fibonacci number 12 is 144 --> This is displayed through Recursive Method.