Program that prompts the user to enter values

Assignment Help JAVA Programming
Reference no: EM131591029

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.

Reference no: EM131591029

Questions Cloud

Write a two pages paper about communication : Write a 2 pages paper about communication, double-spaced, size 12. Arrange and take a visit to an organization in which communication is managed.
What are some of the challenges faced by the researchers : What are some of the challenges faced by the researchers in this study. How did they address them. Were they successful
Analyze the term risk appetite : Imagine that a software development company has just appointed you to lead a risk assessment project. The Chief Information Officer (CIO) of the organization.
Determine the strength of an electromagnet : Describe the difference between a potentiometer and a Rheostat. State 4 factors that determine the strength of an electromagnet.a
Program that prompts the user to enter values : 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
Why would an organization create such a policy or practice : Why would an organization create such a policy or practice? Why might this policy or practice be harmful to employees?
How much and what kind of a difference has the program : Assessing attainment of objectives: How well has the program or initiative met its stated objectives
Write a script introduce toast present an award : Write a script introduce, toast, present an award, nominate, accept, give a keynote address, celebrate commencement, commemorate or give tribute.
An inventory search of seized automobiles would be typically : Devices that enhance the senses but are not generally considered a search include

Reviews

Write a Review

JAVA Programming Questions & Answers

  Write a java program that asks the user for his/her gender

According to researchers at Stanford Medical School, the ideal weight for a woman is found by multiplying her height in inches by 3.5 and subtracting 108.

  Display the properties of an arraylist object

Display the properties of an ArrayList object. The assignment is documented as attached. In 9-3.docx, #4-6 is what I am trying to complete

  Write java program to reverse contents of original array

Write down the Java program method named reversal which returns the new array which is a reversal of original array. Use [5.0, 4.4, 1.9, 2.9, 3.4, 3.5] to test method.

  Testing a leap year library

Write a program Checkerboard.java that takes an integer command-line argument N, and uses two nested for loops to print an N-by-N "checkerboard" pattern

  Write a short paper on what your program does

Using your example, write a short paper on what your program does. Include the logical expression and what type of while loop (EOF, sentinel-controlled, counter-controlled, flag-controlled) you need

  Creating an application that accepts product data

You have been tasked with creating an application that accepts product data and displays this information. The application also computes average sales and shipping charges

  Design and implement a java program that will gather info

Design and implement a Java program that will gather a user's first name, middle initial, lastname, age in years, and 3 lucky numbers. The program should output the following based on the user's input

  Shooting star

Initial project folder you will see the beginnings of a Driver - You need to implement that DoubleListOfBlock methods so they perform

  What is jit compiler

What is difference between JDK,JRE and JVM? 2. How many types of memory areas are allocated by JVM - What is JIT compiler?

  Implement avl trees that allows both iterative traversal

implement avl trees that allows both iterative traversal and recursive traversal.iterative traversal is fairly easy if

  The class date was designed and implemented

In Programming Exercise 2, the class Date was designed and implemented to keep track of a date, but it has very limited operations. Redefine the class date so that, it addition to the operations already defined, it can perform the following operation..

  Write a method named swapall

Write a method named swapAll that accepts two arrays of integers as parameters and swaps their entire contents

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd