Write a JAVA program to read input the age (in years) and weight (in kg) from the user and check if the user is eligible to donate blood or not. Required conditions for donating blood: Age>=18 years Weight>=45 kg
Q: e a java program to calculate the electricity bill for a customer , The program should get the…
A: Write a java program to calculate the electricity bill for a customer , The program should get the…
Q: Write a Java program that asks a user to enter a number and prints out if it is odd or even.
A: Use Scanner class object nextInt() to take input from user. First create object of Scanner class…
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: 6. Write a Java program that reads the length of a scale in inches and then prints the equivalent…
A: Write a Java program that reads the length of a scale in inches and then prints the equivalent…
Q: Write a java program to calculate the electricity bill for a customer , The program should get the…
A: ALGORITHM:- 1. Take input details from the user. 2. Calculate the units consumed on the basis of…
Q: Write a Java program to give the user the ability to determine the day of a given date. The user…
A: import java.util.Scanner; public class DayReturn{ //check and return day static int checkDay(int…
Q: Write a Java program to give the user the ability to enter an integer of 4 digits. Assume the value…
A: 1. Import the necessary header files. 2. Declare the variables. 3. Take input from user. 4. Create…
Q: Write a Java program that prompts 500 students to enter their credit hours earned and then displays…
A: Answer to the above question is in step2.
Q: Write a java program to calculate the Gross, Tax, Net for 10 employees. Assuming: The input is…
A: import java.util.Scanner; public class Main{ public static void main(String[] args) {…
Q: Write a Java program that prompts the user to input the elapsed time for an event in seconds. The…
A: given Write a Java program that prompts the user to input the elapsed time for an event in seconds.…
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 Java program asking a user to enter a letter. If the entered letter is in the text ‘Hello…
A: /*Java program to ask user to enter a letter, if letter exist in "Hellow Word"print Hello else…
Q: Write a Java program to convert minutes into a number of years and days. Test Data Input the number…
A:
Q: Write a Java program to take the temperature from the user in Celsius, convert it into Fahrenheit…
A: Please find the answer below :
Q: Write Java statements that output Male if the gender is ‘M’, Female if the gender is ‘F’ and invalid…
A: Given, We have to write a java code by taking input as M and F from the user, and output Male if…
Q: Write a java program that receives three integers for day, month and year respectively and prints…
A: Algorithm: 1. Start. 2. Initialize months array as months[] = {"January", "February", "March",…
Q: Write a complete Java program that asks the user to input the radius (r) and the height (h) of a…
A: Please find the answer below :
Q: Write a java program that asks the user to enter a day (from 1 to 31), a month (from 1 to 12), and a…
A: JAVA code and sample output whether the date is magic date or not is stated in step 2.
Q: In Java, If a = 4; and b = 3;,then after the statement a = b; executes, the value of b is 4 and…
A: Correct Answer False is the correct option Explanation False is the correct option because when a=b…
Q: Write a complete Java program that prints out the following information: Ask the user to enter the…
A: The main objective of the java program, Rabab.java is to prompt the user to enter the last three…
Q: Write a Java code to accept marks of a student from 1-100 and display the grade according to the…
A: Conversion of string to integer type value: The util package of java provides Scanner class and it…
Q: Write a java program that ask user to enter the grade depending on the below grading system : a.…
A: In the solution of the given problem to find the grade of a student if-else ladder statement is…
Q: Write a java program that can suggest an activity based on the temperature. If the temperature is…
A: Hi. Let's move on to the code in the next step. I have included comments in the code that will…
Q: Write a Java program to read the distance between two points (in Kilometer) and time to travel…
A: The program is written in Java. Please find the Source code in the next step.
Q: Write a Java program that prompts the user to enter an integer. It then finds all the factors of…
A: import java.util.Scanner;public class Main{ public static void main (String[]args) { Scanner…
Q: Write a complete Java program that will calculate and display your BMI based on your weight and…
A: BMI = weight / height2
Q: Write a complete Java program that prompts the student to enter the credit hours earned and then…
A: PROGRAM CODE: import java.util.*; // import java utility packagepublic class…
Q: Write a JAVA program that asks the user to input the instructor Salary (double) and Academic Rank…
A: START PRINT "Input instructor Salary: " INPUT salary PRINT "Input Academic Rank: " INPUT rank…
Q: Write a Java program that returns the result of the division of two numbers that were given by the…
A: CODE:- import java.util.Scanner; public class Main { public static void main(String[] args) {…
Q: Write a Java program that: software: 1- Stores your full name (first name, middle name initial, and…
A: class HelloWorld { public static void main(String[] args) { String a= "Al-Ghamedi,Ahadm…
Q: Write a Java program which allow user to enter a number that represents repetition. Then, the user…
A: In this question, we are writing a java program which calculate the average of numbers and count how…
Q: For an invoice calculation program, write the JAVa program that calculates the amount of VAT and the…
A: It is defined as a powerful general-purpose programming language. It is used to develop desktop and…
Q: Write a JAVA program to read input the age (in years) and weight (in kg) from the user and check if…
A: logic- read age and weight if age>=18 && weight>=45 display “you are eligible for…
Q: Write a JAVA program that uses the standard input to read the user's first name and last name The…
A:
Q: Write a Java program to categorize a person based on their age (allow only positive inputs) into age…
A: Code: /******************************************************************************…
Q: Write a Java program to give the user the ability to enter an integer of 4 digits. Assume the value…
A: /* package codechef; // don't place package name! */ import java.util.*;import java.lang.*;import…
Q: Write a Java program that prompts the user to enter their weight in Kilograms and then convert it in…
A: Input weight in kg. multiply input by 2.2046 and store in variable display output . end.
Q: Write a JAVA program in which an employee enters his/her age(in years) and the program tells whether…
A: Write a JAVA program in which an employee enters his/her age(in years) and the program tells whether…
Q: Input: The dividend and divisor are entered by the user on new lines. Output: The quotient will be…
A: Algorithm : Step 1 : declare variables. Step 2 : create object of scanner class. Step 3 : ask for…
Q: Write a java program that determines a student’s grade. The program will accept 3 scores and…
A: The above program is answered bellow
Q: Write a Java program that asks a user to enter a time of the day (integer number from 0 to 24). If…
A: The java if-else statement also tests the condition.It executes the if block if condition is true…
Q: Write a java program that asks the user to enter an integer from 20 to 99 in numeric…
A: Given Write a java program that asks the user to enter an integer from 20 to 99 in numeric form. The…
Q: Write a Java program that prompts the user to enter their weight in Kilograms and then convert it in…
A: Algorithm: 1. Read weight in Kilograms as weightKg. 2. Convert into Pounds as weightPounds =…
Q: Write a Java program that asks the user to input the jackets quality in any letter case (HQL for…
A: Find Your Code Below
Q: Write a Java program using switch case which assigns tax of 5%, 10% and 15% depending on the cost of…
A: As per the requirement program is completed. Algorithm: Step 1: Write the main() method Step 2:…
Q: Write the Java program that reads the number of correctly solved programs and displays the adequate…
A: START PRINT "Enter the no. of correct programs: " INPUT n IF n == 0 then print "Inadequate…
Q: Write a java program to get the commission on a product if you take the 15% commission. You have to…
A: Required:- Write a java program to get the commission on a product if you take the 15% commission.…
Q: Write a java program that asks user to input these values: 1. The number of gallons of gas in the…
A: I found some mistake in the sample output given in the field for cost of 100 miles. However we…
Q: Write a Java program to take orders for a mobile shop and print a bill, Your program asks for the…
A: Required: Write a Java program to take orders for a mobile shop and print a bill, Your program asks…
Step by step
Solved in 4 steps with 3 images
- Write a JAVA program to read input the age (in years) and weight (in kg) from the user and check if the user is eligible to donate blood or not. Required conditions for donating blood: Age>=18 yearsWeight>=45 kgWrite 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."2. Write a java program that ask user to enter the grade depending on the below grading system :a. Under 50-F c. 50 to 60 - D d. 60 to 70 - C e. 70 to 80 -Bf. more than 80 - A after that print the equivalent grade
- 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 Java program that prompts the user to enter a line of text and outputs the number of digits, the number of lower case letter and the number of upper case letter in that text.Write a Java program that calculates and prints the monthly pay for an employee. The net pay is calculated after taking the following deductions:
- Write a java program to display the total salary of an employee based on the given conditions: Basic : Allowance : <300 : 5% of Basic 300 - 599 : 10% of Basic 600 - 1200 : 15% of Basic >1201 : 20% of Basic 3% of Basic is the tax for all employees, tax = Basic * 0.03; TotalSalary = Basic + Allowance - tax;Write a java program that asks the user to enter the number of laps that they have run around a racetrack. Then, prompt the user to enter the time of each lap (in minutes). The program should calculate and display the fastest lap and the average lap time of all laps.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
- Write a JAVA program that asks the user to input: The number if gallons of gas in the car tank The fuel efficiency in miles per gallon The price of gas per gallon Then (a) print the cost per 100 miles and (b) print how far the car can go with the gas in the tank, (c) Assuming the gas tank capacity is 20 gallons, what will be the cost of adding gas to the existing amount to fill the tankWrite a program in java to check whether a person is eligible for marry or not. Consider for men the age will be 21 and for women the age will be 18 and you have to take different conditionsWrite a java program to get the commission on a product if you take the 15% commission. You have to take the price of product from user.