Write a program that prompts the user to enter an integer


1. do you know the quadratic equation where the roots =( -b +- square root of b squared - 4 * a * c) / (2a) b squared - 4ac is called the discriminant of the equation. if it is positive, the equation has two real roots, If it is zero, the equation has one root. If it is negative, the equation has NO real roots. write a program that prompts the user to enter values for a, b, and c and displays the result based on thediscriminant. If the discriminant is is positive, display two roots. If the discriminant is 0, display one root, otherwise, display "The equation has no real roots".

2. Write a program that prompts the user to enter the month and year and displays the number of days in the month. For example, if the user entered month 2 and year 2012, the program should display February 2012 had 29 days. if the user entered month 3 and year 2015, the program should display that March 2015 has 31 days.

3. write a program that prompts the user to enter an integer and checks whether the number is divisible by 5 and 6 , or neither of them, or just one of them. Here are some sample runs for inputs, 10, 30, 23. output 10 is divisible by 5 or 6 30 is divisible by 5 and 6 23 is NOT divisible by 5 or 6.

Solution Preview :

Prepared by a verified Expert
JAVA Programming: Write a program that prompts the user to enter an integer
Reference No:- TGS02386571

Now Priced at $15 (50% Discount)

Recommended (99%)

Rated (4.3/5)