Write a program that does the following: Asks the user to input a team name Roil
ID: 1715716 • Letter: W
Question
Write a program that does the following: Asks the user to input a team name Roils a dice (random number generator) Output the number (include in a statement) Determine if the value is a valid dice number if it is, output a character already assigned to a variable (i.e 'y' or 'n' for yes or no) If the value is greater than 24 take the square root Then tell the user to go back that many spaces If the value is less than 4 you will have to do some additional thinking to write this program, you can make some assumptionsExplanation / Answer
2.PROGRAM ON ROLLING DICE:
public class SquareRoot{
public static void main(String args[])
{
Scanner scanner = new Scanner(System.in);
System.out.println("Enter number to find square root in Java : ");
double square = scanner.nextDouble();
double squareRoot = Math.sqrt(square);
System.out.printf("Square root of number: %f is : %f %n" , square, squareRoot);
}
}
if (n=16 )
{
}
else valid;
if (n >16)
{
}
else not valid;
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.