Assume that a coach in the FIFA World Cup thinks that the player number of the goalkeeper should be less than 21. In addition, the number should be odd or divisible by 5. Write a Java program that keeps reading from the coach players' numbers. Then the program calculates and prints the number of players that could be goalkeepers. The coach could stop the program via entering zero as a player's number. Hint: You could assume that the user will insert positive integers for players' numbers. Sample Input and Output: Please insert players' numbers: 2 3 5 6 33 0 2 players could be goalkeepers Explanation: Only 2 numbers satisfy the conditions which are 3 and 5
Q: Code the following statments in JAVA If your average time to run each mile is under 11 minutes,…
A: Step-1: StartStep-2: Declare variable avgTime and take input from userStep-3: if avgTime is greater…
Q: Write a program in java that is going to read m donors' name surname and the amount donated, and…
A: PROGRAM EXPLANATION : - For sorting the Donors based on amount they have donated, it is good idea to…
Q: Write a JAVA program that declares a variable that represents the minutes worked on a job and assign…
A: Here is the easy approach :- Create three variables one to hold the minutes then second to hold…
Q: Write java program that prompt the student to enter an integer number (between 1 till 5 inclusive).…
A: import java.util.Calendar; import java.util.GregorianCalendar; import java.util.Scanner; public…
Q: Question 3: Write a Java program that takes two numbers from user as input and display the sum…
A: PROGRAM STRUCTURE: Import the required classes and packages. Start the definition of the public…
Q: You are teaching a class and decide to curve the exam grades. Write a Java program that reads…
A: import java.util.*;class Test97 { public static void main(String args[]) { Scanner sc = new…
Q: Test Case 1 Enter number of seconds \n
A: The user for a number of seconds. Display the number of minutes , seconds, and hours accordingly. 60…
Q: Write a simple java program that accepts as input: a student’s name, ID number, Major, GPA, and…
A: Input from User: Student’s name ID number Major GPA Bi-weekly paycheck Output to Console: All the…
Q: Using java language, write a program with total change amount in pennies as an integer input, and…
A: Actually, java is a object oriented programming language. It is a platform independent.
Q: write a java program A twin prime is a prime number that is either 2 less or 2 more than another…
A: I have given an answer in step 2.
Q: Write a java program that displays a square shape of the first letter of your name. Your program…
A: Please find the answer below :
Q: Write a program that will calculate car insurance premium using Java!!! Steps to write a program:…
A: import java.util.*;import java.lang.*;import java.io.*; class Codechef{ public static void main…
Q: Write a program that reads from the user the initial KiloMeters of the car, the current KiloMeters,…
A: Answer
Q: Create a Java program that will read a date (month, day and year) in integer form and display the…
A: Simple Date Format is a concrete class for formatting and parsing dates in a locale-sensitive…
Q: Write a program that keeps reading integers from the user until he enters a negative number. The…
A: import java.util.*; public class Main{ public static void main(String[] args) { Scanner sc=new…
Q: Write a java program that asks for the name, hours worked, and hourly rate of an employee. The…
A: program code: import java.util.*;import java.util.Scanner;class Main{ public static void main…
Q: Test Case 3 Check your lottery numbers here! n Enter number 1: \n 10 ENTER Enter number 2: \n 53…
A: Here I ahve stored the lottery numbers into an array. Then, I have taken input from the user and…
Q: Write a java program that prompts the user to enter two integers, intLeft and intRight, taking into…
A: Read two variables intLeft and intRight using Scanner class. Check the condition whether intRight is…
Q: You are asked to write a java program for an embassy to help with the visa process. Your program…
A: To solve the given question first you need to take input in the given format then you have to…
Q: ) The Bahraini Charity Club is conducting a fundraiser by selling chilli dinners to go. The price is…
A: PROGRAM INTRODUCTION: Import the required libraries. Start the definition of the main function.…
Q: Create a java program that will take a positive number between 1 and 3999 inclusively and return the…
A: Given:- Create a java program that will take a positive number between 1 and 3999 inclusively and…
Q: Write a Java program that reads two positive integers num1 and num2 (assume num1 < num2). Then, the…
A: The question is to write JAVA code for the given problem.
Q: Write a Java program that will ask the user to enter an integer number and then reverses the number.…
A: Algorithm : Step 1 : declare variables. Step 2 : create object of Scanner class. Step 3 : ask for…
Q: Write a java program that prompts the user to enter two integers, intLeft and intRight, taking into…
A: public static Scanner scan = new Scanner(System.in); declare scan object for taking input…
Q: Write a Java program called IntCheck that examines the integer variable x, printing GT (greater…
A: // Defining the Main Classpublic class Main{ // Function to check the Number x public void…
Q: We want to calculate the volume of a reservoir that has a cylindrical shape meters cube and in…
A: C++ Program for above : #include <bits/stdc++.h> using namespace std; int main() {…
Q: write java program that prompt the student to enter an integer number(between 1 till 5 inclusive)…
A: Code :-…
Q: Write a program in java which display the burger Sizes and its prices in tabular form as display…
A: Required: Write a program in java which display the burger Sizes and its prices in tabular form as…
Q: 1. Write a program in Java to calculate and print the Electricity Generator Bill, the user should…
A: As per the requirement program is completed in java. Algorithm: Step 1: Write the main() method Step…
Q: There are several cases where we can use conversions from one quantity to another. It can be about…
A: given data
Q: Write a Java program that converts temperature from Fahrenheit to Celsius and vice versa. The…
A: The answer is as follows.
Q: Write a Java program that prompts the user to enter the seconds as a String (e.g., “1500500500”),…
A: One year has 365*24*60*60 seconds One day has 24*60*60 seconds
Q: Write a program in Java to generate the entire calendar for one year. The program must get two…
A: the program is given below:-
Q: There are several cases where we can use conversions from one quantity to another. It can be about…
A: Attached Java Source code below import java.util.Scanner; public class conversion { public static…
Q: Following an economic crisis, the CEO (Chief Executive Officer) of EXOSTAR company decided to give…
A: *******************************************************************************/import…
Q: Following an economic crisis, the CEO (Chief Executive Officer) of EXOSTAR company decided to give…
A: Use an infinite loop to accept input for employees salaries and update the salary at that time
Q: java You must print the number declared double x; on the screen. With which of the following…
A: Format specifiers begin with a percent sign (%) and end with a converter. Since x is of type double,…
Q: Write, Compile and Execute a Java program that reads an investment amount, annual interest rate and…
A:
Q: Q1: Write a java program that includes a method called Reader that reads unlimited number from the…
A: ANSWER:-
Q: Write an java application that allows a user to enter any number of student quiz scores, as…
A: Program: import java.util.*; class Main { public static void main(String args[]) { Scanner sc =…
Q: Write a program that keeps reading integers from the user until he enters a negative number. The…
A: According to the Question below the Solution: Output:
Q: Write the Java code that will prompt the user for the temperature in Fahrenheit. The program will…
A: Input temperature in Fahrenheit Convert the Temperature to Celsius If temperature in between…
Q: Write a program that reads from the user the initial KiloMeters of the car, the current KiloMeters,…
A: Step-1: Start Step-2: Declare variable currentKm, initialKM, fuelAmount and fuelConsumption Step-3:…
Q: Make a JAVA program where it computes the monthly wage of employee, prompt the user to enter a…
A: Find Your Java Code Below
Q: Using Java to, write a program that asks the user for survey data about bus riders, and outputs a…
A: read muniline read number of days read number of riders calculate avg=(float)riders/days display avg…
Q: Your little sister asks you to help her with her multiplication, and you decide to write a Java…
A: ANSWER:-
Q: Write a program in Java to calculate how many respective coins are there in the wallet.
A: START Declare s, money, p50=0, p25=0,p20=0,p10=0,p5=0, rs, p Display "Enter amount in wallet:" input…
Q: Write a java program that prompts the user to enter an integer between 1 and 12 and displays the…
A: Here have to determine about java code for give output of month word.
Q: Make a JAVA program where it computes the monthly wage of employee, prompt the user to enter a…
A: Algorithm is step by step instructions to solve a problem . We use different symbols to represent…
Q: You are asked to write a java program for an embassy to help with the visa process. Your program…
A: I give the code in Java along with output and code screenshot
Step by step
Solved in 3 steps with 1 images
- Write a Java program that lets the user enter the monthly interest rate, number of years, and loan amount, and computes monthly payment and total payment and print both results each on a separate line. The total payment = monthlyPayment * 12 * numberOfYears monthy payment = (loan amount)*(monthy interest rate)/(1 - (1/(1+monthly interest rate)^(number of years * 12)))Write a program In java that asks for the user's age. If the age is under 13, output, "You are a child". if age is greater than 13 and less than 19, output, "You are a teen". if age is greater than 19 and less than 65, output, "You are an adult". Over 65, "You are a senior citizen".IN JAVA. Write a program that takes in a line of text as input, and outputs that line of text in reverse. The program repeats, ending when the user enters "Quit", "quit", or "q" for the line of text. Ex: If the input is: Hello there Hey quit the output is: ereht olleH yeH
- Write a Java program that asks the user to input the jackets quality in any letter case (HQL for high quality , LQL for low quality ) and their prices in factory, until the user enter QUIT in any case letter to stop. your program should count the number og HQL and LQL jackets, as well as the HQL price of jackets, then print the result on the screen. your program should ignore any unknown jacket quality.Write a Java program that asks a user to enter his/her age. If the user's age is in the range of [18, 150] (18 ≤ age ≤ 150), program prints “Old enough!”, when the given age is smaller than the given range it must print “Too young”, and otherwise prints "Incorrect age."Write a java program to calculate the electricity bill for a customer , The program should get the customer's information such as customer name , previous reading and current reading as input .After that program should calculate the amount according to number of units consumed by the customer and print a bill .The sample bill and rate per unit are given below. For example a customer consumes 300 units; First hundred units would be charged at the rate of 15 ,and remaining at 30 respectively as per rate given below. Unit range Rate per unit 1-100 15.0 101-300 30.0 301-500 45.0
- You will write a Java program that will perform the following operations, in this order:1) Input a series of three Fahrenheit temperatures (as doubles) from the keyboard.2) Output the following for each temperature, all on the same line (i.e., a total of threelines of output, each with four labeled values):• The original Fahrenheit temperature• The temperature converted from Fahrenheit to Celsius• The temperature converted from Fahrenheit to Kelvin• The converted Kelvin temperature converted back to FahrenheitNotes/Specifications:a) Display all values as floating point numbers to two decimal places.b) Clearly prompt all inputs and label all output explicitly. There should be no doubtwhat each output value is. All output must be uncluttered and easy to read.c) Have at least one blank line between each line of output.d) Research all conversion formulas and test aggressively to make sure your resultsare correct.e) The program consists of just one class.• You need to write three short…Write a Java program that reads two positive integers num1 and num2 (assume num1 < num2). Then, the program will display all perfect numbers between num1 and num2. A positive integer is called a perfect number if it is equäl to the sum of all of its positive divisors, excluding itself. For example, 6 is the first perfect number because 6 = 3 + 2 + 1. The next is 28 = 14 + 7 + 4 + 2 + 1. Hint: use modulus (%) to find the divisor of a number. Sample Input/Output Enter two numbers: 6 1001 6 is a perfect number 28 is a perfect number 496 is a perfect number Note: Your answer should follow the given sample input / output.Write a java program to calculate the Gross, Tax, Net for 10 employees. Assuming: The input is First Name, Middle Initial, Last Name, Id number, Hours worked, Rate per Hour. constant state tax percentage 7%, Fed tax percentage 15% hours worked must be between 0 and 60 hours Rate per hour must be between $15.00 and $35.00 Gross calculations: If hours worked are 0 to 40 (Gross= Hours worked * Rate per Hour) If hours greater than 40 (Gross= 40 * Rate per Hour + ( Hours worked - 40 )* Rate per Hour hours * 1.5)) State Tax = Gross * State Tax percentage Fed Tax = Gross * Fed Tax percentage Net = Gross - (State Tax + Fed Tax) Output: Display: MUST BE FORMATTED and as a table Last Name First Name MI Id# Rate Per Hour Hours Worked State Tax Fed tax Gross Net Smith mike x 123 $10.00 40 $28.00 $60.00 $400,00 $312.00 : Directions: 1) submit…
- **This is programming with Java. Im a bit confused.. When answering if you could be kind enough to explain as well** Input When your program runs, it should have a dialog with the user. Ask the user: 1) the x and y location of the center of each asteroid as well as its size (allow the user to decide how many asteroids), 2) the current score, 3) the number of lives remaining, 4)the x and y location of the player’s spaceship, 5) the x and y location of at least 1 alien spaceship, and 6)the color of the player’s spaceship and the alien spaceship (use integers, e.g. 1=red, 2=blue, 3=green). Make sure the user enters values that will look good (e.g. each asteroid should display fully on the screen). Give the user a range of acceptable values in each prompt and make them repeat each input until they get it right. Important Tip: Instead of storing the asteroid locations and sizes, draw each asteroid as soon as the user has entered its x, y, and size values. Output When the stage appears, it…You are teaching a class and decide to curve the exam grades. Write a Java program that reads student scores, finds the best score, and then assigns grades based on the following curve: A student earns an A if their score within 10 points of the best score A student earns a B if their score within 20 points of the best score A student earns a C if their score within 30 points of the best score A student earns a D if their score within 40 points of the best score Otherwise, the student earns an F The user is prompted to enter the number of students first, then all of the scores. Each grade is printed on a single line. Input 4 40 55 70 58 Output C B A Bin Java Write a program that establishes two savings accounts with saver1 having account number10002 with an initial balance of $2,000, and saver2 having account 10003 with an initialbalance of $3,000. Set a common rate of interest at 5% per year. At the end of each month,update the balance by adding one month’s interest to the balance, so that the balancecompounds monthly. Print an output that displays the month number and the account numberand the balance for each of the two accounts. Use month 0 to display the initial balances, month1 to display the balances after the first month’s interest, and so on. At the end of the year,display the total balance for both accounts combined, like this:Output:Monthly balances for one year with 0.05 annual interest:Month Account # Balance Account # Balance----- --------- ------- --------- ------- 0 10002 2000.00 10003 3000.00 1 10002 2008.33 10003 3012.50 2 10002 2016.70 10003 3025.05 3 10002 2025.10 10003 3037.66 4 10002 2033.54 10003 3050.31 5…