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: In a company Staffs are paid on an hourly basis. If a staff works up to 20 hours he/she is paid 5¢…
A: Wage = Number of hours worked * wage rate. If number of hours worked<=20, wage rate = 5¢ /hr Else…
Q: TASK 3: Write a program that accepts the input code from the user and print according to the input…
A: in c: #include <stdio.h>int main(){ int n1; printf("enter the number: ");…
Q: A clothing store added a promotion which give 20% discount on t-shits if the total cost of purchased…
A: CODE:- price = 150quantity = int(input('How many shirts you want to purchase = '))amount = price *…
Q: Write a program in java to determine the factorial of number. Note- number should be inputted by…
A: The programming methodology for the given program is given by: Importing packages Class Main Main…
Q: 2. Write a complete program that prompts the user for a test score and prints out the letter score…
A: Here I written Java code for given problem. I hope you like it.
Q: QUESTION 13 Write a Java program that prompts the user to enter the monthly salary amount of an…
A: I give the code in Java along with output and code screenshot
Q: Write a program that mimics a calculator. The program should take as input two integers and the…
A: Please find the answer below :
Q: UTER FUNDAMENTALS AND PROGRAMMING 2 USING JAVA Problem 1: Using Scanner format, create a program…
A: Java code to compute the discount amount and the discounted price is given below.
Q: 3. Write a program that takes a bank account balance and an interest rate as an input. And then…
A: #include<stdio.h>int main(){ int initialBalance; float interestRate; int…
Q: Write a program that prints your complete name on the first line and course, year and section on…
A: PFB the asked program: import java.io.*; class GFG { public static void main (String[] args) {…
Q: Develop a Java program that asks the user to enter a integer number, to determines the temperature.…
A: Code: import java.util.Scanner;public class Main{ public static void main(String[] args) { int…
Q: 3. Write a program that takes a bank account balance and an interest rate as an input. And then…
A: Solution : Solving above question in c++ please see to it ... Code :: .…
Q: Write a program that prompts the user to enter the minutes (e.g., 1 billion), and displays the…
A: Store minutes as long int to store longer values
Q: Question 4: Write a JAVA program to take input an integer num from user and in output print the…
A: Given: An integer num taken input from user. Requirement: Write a JAVA program to take input from…
Q: Exercise 1: Create a JAVA program that prompts the user to enter a numerical test mark and displays…
A: Here I have taken input from the user and then used the if-else block to first validate it. Then, I…
Q: Using Java, read a line of text, which contains a minimum of one palindrome word. Find out the…
A: HI THEREI AM ADDING ANSWER BELOWPLEASE GO THROUGH IT THANK YOU
Q: 1. Write a program that prints your name, age, and department in console 2. Write a program that…
A: As no programming language is mentioned, it is solved using C++
Q: Write the java code to take the employee Net Salary as input and according the below…
A: Here you need to definitely check a condition but you are not supposed to use if-statements. We need…
Q: Write a program that computes the cost of painting and installing carpet in a room. Assume that the…
A: In this question, we will create a class ROOM to store the properties of the room and to calculate…
Q: Write Java program that asks the user to enter an integer number than accomplish each of the…
A: Java Code for the above problem program is in next step and outputs are also attached in which we…
Q: Write a program with total change amount in pennies as an integer input, and output the change using…
A: Introduction of Program In this C++ program, the change will be calculated as given below 1 dollar =…
Q: Direction: Create a simple Java Program that will output the grades of 1 student in different…
A: Find Your Answer Below
Q: Write each condition down below in valid Java boolean expressions x > y > z X and y are both less…
A: Java boolean expressions: The Java operators are different from the mathematical symbols like =, ≠,…
Q: Write a program that reads from the user the initial Kilometers of the car, the current Kilometers…
A: Java program for the above fuel consumption problem is given below in step 2.
Q: Use the input function in java to make the user of the program guess your favourite fruit.
A: Please refer below for your reference: Language used is Java:
Q: Question 2 Write a Java program that will ask the user for the number of rooms (including kitchens…
A: Code copy: import java.io.*; import java.util.Scanner; class Rooms { public static void main(String…
Q: 2. Write a complete program that prompts the user for a test score and prints out the letter score…
A: import java.util.Scanner;public class Main{ public static void main(String[] args) { Scanner sc…
Q: Write a JAVA program to read the marks scored in the test until a sentinel value -1 is entered by…
A: Algorithm : Step 1 : declaring variables to store the count of students appeared , passed and marks…
Q: 3. Write a Java program to declare a variable “Gender" to accept the input from the user then print…
A: Code import java.util.*;public class Main{ public static void main(String[] args) { Scanner sc =…
Q: Write a code in Java: Write a program that will prompt the user for a temperature, and a choice to…
A: Java Code: import java.util.Scanner; public class Main{ public static void main(String[] args) {…
Q: Write an AWT Java program that will require the user to input two integers and arithmetic operator…
A: The complete source code is given below:
Q: 2.1 Write a Java program that asks the user to enter their high school grade out of 4 as well as…
A: AND is true if both statements are True and OR is true if any of statements is True So, we can check…
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 code: Scenario: One of the renowned supermarket in Dhaka City, “Shwapno” is…
A: Program with comments: //custom exceptionpublic class NameException extends Exception{ //…
Q: Write a program that will input a year code and output year level. (Use if-else and switch-case…
A: Algorithm: Start Take year code from user Check the given year code is from which year if(First…
Q: a. What is the output of executing the following Java statements: {5 int x = 10, y = 20; boolean bl…
A: The output for the program is given below Output - The value of b3 is false The value of b4 is…
Q: 17.Write a Java program that prompts the user to input an integer greater than 0 which represents…
A: Here is the java program of above problem. See below steps for code and output.
Q: draw the process flow for calculating the Income tax of an employee. Write a java program which…
A: Income tax = Slab rate(percentage) / Annual income * 100 Annual Income=monthly income * 12
Q: C++) Write a program with total change amount as an integer input, and output the change using the…
A: /*Write a program with total change amount as an integer input that outputs the change using the…
Q: Write a program that will input 2 fractions and compute the display the sum of the two fractions.…
A: The answer is
Q: 2. Write a complete program that prompts the user for a test score and prints out the letter score…
A: //2import java.util.Scanner;//to reading input from userpublic class Main{ public static void…
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 a program that reads from the user the initial Kilometers of the car, the current Kilometers…
A: Required: Write a program that reads from the user the initial Kilometers of the car, the current…
Q: 1.Write a Java program of Rock-Paper-Scissors. Two players will input the first equivalent letter.…
A: We need to write a Java program of Rock-Paper-Scissors. We need to take two inputs from the user and…
Q: 2. Write a program that computes the cost of painting and installing carpet in a room. Assume that…
A: Actually, program is a executable software that runs on a computer.
Q: Write a java program, which accepts an integer from the user and checks whether the number is…
A: Code: import java.util.Scanner;public class Main{ public static void main(String[] args) {…
Q: Write a Java code to accept marks of a student from 1-100 and display the grade according…
A: import java.io.*;import java.util.*;public class MyClass { public static void main(String args[])…
Q: Write a Java program using If-Else If That will allow the user to input the age of student and will…
A: function main: Start declare age, commission read age if age >= 100 then commission = (age * 2)…
Q: WT Java program that will require the user to input two integers and arithmetic operator then it…
A: Given :
2. Write a JAVA
Required conditions for donating blood:
Age>=18 years
Weight>=45 kg
Step by step
Solved in 3 steps with 1 images
- 1.Blood sugar is considered normal if its rate is less than 140 and greater than 70, it is considered high if its rate is greater than or equal to 140, and it is considered low if its rate is less than or equal to 70. Write a Java program that asks the user to input the rate of blood sugar of each patient in a hospital (-1 to indicate the end of the data.) The program should calculate and print the number of patients with normal blood sugar, number of patients with high blood sugar, number of patients with low blood sugar, and the total number of patients entered by the user.The Café Noir Coffee Shop wants some market research on its customers. When a customer places an order, a clerk asks for the customer’s zip code and age. The clerk enters that data as well as the number of items the customer orders. The program operates continuously until the clerk enters a 0 for zip code at the end of the day. When the clerk enters an invalid zip code (more than 5 digits) or an invalid age (defined as less than 10 or more than 110), the program reprompts the clerk continuously. When the clerk enters fewer than 1 or more than 12 items, the program reprompts the clerk two more times. If the clerk enters a high value on the third attempt, the program accepts the high value, but if the clerk enters a negative value onthe third attempt, an error message is displayed and the order is not counted. At the end of the program, display a count of the number of items ordered by customers from the same zip code as the coffee shop (54984), and a count from other zip codes. Also…The Meteorological service requires a program to allow the operator to enter the rainfall level. The program will keep displaying the current min, max and running average rainfall level after an entry is made. The program terminates by the operator entering a negative value and displaying the total number of entries made. JAVA PROGRAM ( INTELLIJ )
- Airline companies apply baggage restrictions for their passengers. An airline company has decided to apply a 10kg limitation for passengers' hand luggage and 20kg for their normal baggage. When passengers arrive, they enter their hand and normal luggage weight from the keyboard. If passengers exceed their normal baggage allowance of 10 dollars per gram, they pay 12 dollars per kg. Accordingly, write the program that calculates the baggage price of the airline they will go to according to the baggage values entered by the arriving passenger and keeps this from closing the program for each passenger. Note: If hand and normal baggage allowances are stretched below the maximum value, the payment amount will be considered not negative. An example printout is given on the right. Geri bildirim gönder3. A company XYZ hires its employees only when the age of the employees is greater or equal to 18 years. Write a JAVA program in which the user can enter his/her age the program prints whether the user is eligible to be an employee of the company or not.JAVA PROGRAM A company selling household appliances gives commissions to its salesman determined by the kind of product sold as well as the sales amount.Type 1: 7% of sale or 400, whichever is more.Type 2: 10% of sale or 900, whichever is less.Type 3: 12% of sale.Type 4: P250, regardless of sale price.Make a program that would input the TYPE of appliance sold (between 1-4) and the sale PRICE(a positive floating-point value), and output the COMMission that the salesman will receive.
- For grading system (0 to 100) for the course MATH, SCIENCE and ENGLISH create a program that will calculate the AVERAGE GRADE and, assigned grades (A, B, C) based on the percentage obtained by a student.if the percentage is above 90, assign grade A if the percentage is above 75, assign grade B if the percentage is above 65, assign grade C. Write a JAVA or PYTHON programm * МАТH 80 SCIENCE 75 ENGLISH 90 FINAL GRADE 81.67 EQUIV. GRADE В 介仓A Software Engineering Company has a salary system based on position level. The table below represents the salary paid according to each position: Employee Position Employees Salary Employees' Name: Ali Position: Bonus Amount: Final Cost: $3500 Manager Supervisors Sales Person The Company decided to give a 25% bonus for employees whose salaries are less than 3000$ due to holidays. Write a java program that asks the user to enter his/her name, and his/her work position. The program should calculate and display the total salary of the employee based on his/her salary position, the bonus amount and the final salary for an employee. Make sure that your program outputs exactly as the sample run below. Sample Run1: Enter Your Name: Ali Enter Your Position (M for Managers, S for Supervisors or P for Sales Person): M Fixed Monthly Salary 3500$ 2100$ Manager Salary: $3500.0 $0.0 Internet Service Bill 700$ Sample Run2: Enter Your Name: Cerine Enter Your Position (M for Managers, S for…Use java code Body Mass Index (BMI) is a measure of health on weight. It can be calculated by taking your weight in kilograms and dividing by the square of your height in meters. The interpretation of BMI for people 16 years or older is as follows: BMI below 16 16-18 19-24 25-29 30-35 above 35 Interpretation seriously underweight underweight normal weight overweight seriously overweight gravely overweight Write a Java program that prompts the user to enter a weight in kilograms and height in meter and display the BMI. Use nested if- else statements to solve this exercise. Here is a sample run: Enter weight in kilograms: 66.22 Enter height in meters: 1.788 Your BMI is 20.71353142 You are normal weight
- Write pseudocode to describe an average mark calculator program that computes the average mark for a course. 1. The program prompts the user to enter the following information: a. Request that the user type in the course code.b. Request each student mark be entered one at a time. 2. The program executes continuously (each time prompting for the next student mark) until the user enters a negative number to signal that the marks entry is completed. Note that a negative number is not considered a mark. 3. The program then outputs the following information:a. The course code.b. The average mark for the course.c. The highest mark for the course.d. The lowest mark for the course.4. The program then restarts from (1). 5. To exit the program, the input "stop" is entered in the course code prompt.Declare your variables. *Guide me to solve this question with step-by-step solution. Thank you in advance.A linear equation can be solved using Cramer’s rule given in Programming. In Java Write a program that prompts the user to enter a, b, c, d, e, and f and displays the result. If ad - bc is 0, report that “The equation has no solution.Use your previous working Java program as a starting point (Project 3). Create another function that determines whether the customer should receive a discount. Assume your food truck gives a 10% discount on orders over $50 (the total BEFORE tax). If the order is eligible for a discount, then calculate and display the discount. If the order does not get a discount, then still display the discount, but it should be 0. Include a line before this that tells every customer that your business gives a 10% discount on all orders over $50 so they understand this part of their receipt. You will also create two classes, one for existing project two called foodTrack and another class called foodDiscount that extends foodTrack. This is project 3: //initialize program import java.util.Scanner; public class Main { finalstatic String items[]=new String[]{"FRIES","CHEESESTEAK","BISCUIT","SALADBOWL","DONUTBOX","SALESTAX"}; finalstaticfloat…