Integer a = 100 Integer b= 100 Integer c = 200 Integer d= 200.Output the java code for a==b and c==d and explain what is happening and why?
Q: In Java program, please show the output of the program. Thank youuuuuuuuuuuuuu!
A: public class Main{ public static void main(String[] args) { System.out.println("Manufacturer:…
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 to take a day from user and then print if user entered Sunday then wow it holiday…
A: Requirements :- Solution :- Please see the code below with output .
Q: I need help with this question Write a Java program that prompts the user to enter a word then…
A: code:
Q: In JAVA language, write a program to input the distance in kilometers and convert the distance into…
A: In JAVA language, write a program to input the distance in kilometers and convert the distance into…
Q: Suppose you have a real number variable x. Write a Java expression that computes the following value…
A: Given : Suppose you have a real number variable x. Write a Java expression that computes the…
Q: y=1; x=2; if (x>0) x=x+5+y; if (x==2) x=x-2+y; if (x=8) x=y=3;
A: Here we have x=2 and y=1. Then, we have an if statement with condition x greater than 0, which is…
Q: Create a JAVA program to read a string from the user and print every character of the string in the…
A: Create a JAVA program to read a string from the user and print every character of the string in the…
Q: Mr. Jhon was very good in Mathematics and coding. He was given 2 positive numbers a and b. You also…
A: In the above problem, we need to design a java program to solve the problem. Algorithm - Take…
Q: /rite the Java code: 1. Prompt the user for the length and the width of a rectangle in inches 2.…
A: Program : import java.util.Scanner;class Main{ public static void main(String args[]) {…
Q: Rewrite the following expressions in java code: x =sin(y) where y is a double value such that 0 <=…
A: import java.util.Scanner;public class MyClass { public static void main(String args[]) {…
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 prompts a student to enter a Java score. If the score is greater or equal to…
A: Here to end the program, we need to input -1. Thus we need to use loop. Also since language not…
Q: Write a java program that accepts a 5 integer number (from the user) and calculates the sum of all…
A: EXPLANATION - Firstly Take five digit number input from user . Then create while loop . Then keep…
Q: how to input a number with comma, if the input does not contain comma it will ask to input again…
A: Code: import java.util.Scanner; public class Main{public static void main(String args[]){ Scanner…
Q: 1. Write a Java program to solve quadratic equations like ax2+bx+c=0 2. write a java class that…
A: Please name your program with classname.
Q: Write a java method that rounds a double number as shown below, without using String, Math or a.…
A: Hello Student Warm Greetings from my side.
Q: Ask the user for a number of seconds. Display the number of minutes, seconds, and hours accordingly.…
A: Here, Code instruction is given.
Q: Create a JAVA program that will ask the user to enter 10 numbers and display it in ascending order.…
A: logic:- define an array of size 10 use loop to take input of 10 elements use another loop to swap…
Q: Answer? Prompt the user for a number x and output the sum of all numbers from 1 to x. If the…
A: Given: To write a java code.
Q: In Java Find the value of x , y after the statements are executed: y=10; x=0; test=2>2 || 6>4; if…
A: int y=10; int x=0;boolean test=2>2 || 6>4; 2>2 false 6>4 true false or true is…
Q: JAVA What will be the values of x and y after the following code is executed? int x = 10, y…
A: class HelloWorld { public static void main(String[] args) { int x = 10, y = 20; while…
Q: java program that will print out the prime number from 0-1000.
A: A prime number is a number that is only divisible by 1 or itself i.e. a prime number is the number…
Q: In Java Find the value of x , y after the statements are executed: y=1; x=0; if (x>0) { if (2==2)…
A: if else is a conditional statement. If condition gets true then statement within if is executed…
Q: Using Java, make a program that computes and displays various properties of a circle. For the…
A: The required java program using input/output processing has been given in the next step.
Q: Create a java program that will accept a series of numbers from user and determine whether each…
A: Algorithm: 1. Start 2. Read number till user enters 0 3. If number entered is not zero, check if it…
Q: Create a java program that puts numbers as argument in the command prompt and display total positive…
A: Given: To write a Java program that puts numbers as argument in the command prompt and display total…
Q: Create a JAVA program that will ask the user to enter 10 numbers and display it in ascending order.
A: Below is the code in java and sample output:
Q: gram, please show the output of the program. Thank youuu!!
A: Program Approach: 1- Import all the necessary packages like io. util, etc.2- Create the object of…
Q: write a java application Take 20 integer inputs from the user and perform the following operations…
A: Algorithm: Start Read 20 numbers and store them in an array Define functions to count number of…
Q: Write a JAVA program that keeps asking the user for numbers, until the user enters 0. After the user…
A: Program Explanation- Include the header file for scanning the values. Create a class with the same…
Q: This is a java question just give me the explanation and the output pleas
A: First is a class which has an instance variable i Its constructor accepts a parameter and prints the…
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 code that prints a 4 digit number supplied by the user, vertically using modulus and…
A: Take the user input for 4 digit number ex. 1234 Then take modulo 10 of the number 1234 % 10 will…
Q: 2. Write a Java program that takes input an positive integer from the user and prints the largest…
A: To find the largest integer that is less that the log base 2 of any number n, we have to right shift…
Q: Java code for this: Given two number for the variables A and B, create a program that would: A.…
A: Write a program using java that will follow the following conditions and given output: Given two…
Q: write a java program that converts years to weeks, days, hours, minutes and seconds. Assume that 1…
A: Actually, java is a object oriented programming language. It is a platform independent.
Q: This is in JAVA What is the final value of y? intx=77; int y = 4; if (x == 77) { y = y + 1; } if…
A: Here we have two variables x = 77 and y = 4. Next, we have 3 different if statements: if x is equal…
Q: Please write a java code using the photo below. The second photo is the output of my program that I…
A: Check the code below.
Q: Convert the following mathematical formulas to a Java expression: Suppose: x is integer, y is…
A: The equivalent java expression for the given mathematical expression is:…
Q: Below is a java code that converts seconds, weeks, hours, and minutes. Revise the given code to make…
A: logic for day to hours , minutes, seconds day= n/24*3600 hours=n%(24*3600)/3600…
Q: Assume that a runner runs 15 kilometers in 50 minutes and 30 seconds. Write a Java program that…
A: The, answer has given below:
Q: Constantly ask the user for a number. End the program when zero is entered. Write a code in Java…
A: This can be done using an infinite while loop and can break when 0 is the input or we can make use…
Q: how to scan/input a number with comma ex.(2.5, 3.5, 2.5) in java
A: public static void main(String args[]) { Scanner dis=new Scanner(System.in); int…
Q: 5. Write a Java program that reads a number in inches then converts it to meters. Note that One inch…
A: Program outline: Ask user to input a number in inches. Use Scanner class of java to take user…
Q: Write a Java program that asks a user to enter three numbers and print out the least one
A: According to the question below the solution: in question mention print least one so i print the…
Q: In Java Find the value of x , y after the statements are executed: y=2; if (y>2) y=4; else y=7;…
A: if else is a conditional statement in which condition within if is checked. If it is true then…
Q: Name:- MIT Note:- Please type this java code and also need an output for this given Java program.…
A:
Q: (Write in java) Assume that a vehicle plate number consists of three uppercase letters followed by…
A: The program is written in java public class Main { public static void main(String[] args)…
Integer a = 100
Integer b= 100
Integer c = 200
Integer d= 200.Output the java code for a==b and c==d and explain what is happening and why?
Step by step
Solved in 5 steps with 2 images
- 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 weightwhite a java program that calculate commission. The salespeople receive $200 per week plus 10% of their weekly gross sales (for that week). If Matt grosses $3,000 in a week he receives $200 plus 10% of $3,000 for a total of $500. Write a program that determines how many of the salespeople earned salaries in each of the following ranges: 1. $200 - 299 2. $300 - 399 3. $400 - 499 4. $500 - 599 5. $600 - 699 6. $700 - 799 7. $800 - 899 8. $900 - 999 9. $1,000 and over Please assume that each salesperson's salary is truncated to an integer amount.Java Lab 401120 Lab 7 Dec 21, 2020 1. Write a java program that calculate the GPA for 20 students. ote: a. You will enter the grade for each student. b. Assume that there are three courses for each student c. Use method to calculate the GPA.
- Using Java code: Write a program that is given two integers representing a speed limit and driving speed in miles per hour (mph) and outputs the traffic ticket amount. Driving 10 mph under the speed limit (or slower) receives a $50 ticket. Driving 6 - 20 mph over the speed limit receives a $75 ticket. Driving 21 - 40 mph over the speed limit receives a $150 ticket. Driving faster than 40 mph over the speed limit receives a $300 ticket. Otherwise, no ticket is received.For an invoice calculation program, write the JAVa program that calculates the amount of VAT and the price of goods or services excluding VAT, according to the VAT rate and the total amount including VAT entered on the keyboard. (Total amount including VAT = cost of goods services excluding VAT X VAT rate + price of goods services excluding VAT)The following problem shows up in a number of Java texts, including Savitch's textbook: The Harris-Benedict equation estimates the number of calories your body needs to maintain your weight if you do no exercise. This is called your basal metabolic rate, or BMR. The calories needed for a woman to maintain her weight is: WBMR = 655 + (4.3 × weight in pounds) + (4.7 × height in inches) − (4.7× age in years) The calories needed for a man to maintain his weight is: MBMR = 66 + (6.3 × weight in pounds) + (12.9 × height in inches) − (6.8 × age in years) A typical chocolate bar will contain around 230 calories. Write a program that allows the user to input his or her weight in pounds, height in inches, and age in years. The program should then output the number of chocolate bars that should be consumed to maintain one’s weight for both a woman and a man of the input weight, height, and age. NOTE: This is an application of a selection statement! Input Data: Use a named constant for the…
- 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…Java code for this: Given two number for the variables A and B, create a program that would: A. print the sum of A and B B. print the average of A and B, if the sum is greater than 100 C. print the product of A and B, if the sum is less than or equal to 100.Write the java code to take the employee Net Salary as input and according the below conditions,print the employe status : i. If Net Income is greater than 1500000, employee status will be “High Income Class” ii. If Net Income is greater than 1200000 but less than or equal to 1500000, employee status will be “Upper Middle Income Class” iii. If Net Income is greater than 800000 but less than or equal to 1200000, employee status will be “Lower Middle Income Class” iv. If Net Income is less than or equal to 800000, employee status will be “Low Income Class” Note :You will not use any If-Statement in your code.
- Java program to convert Fahrenheit to Celsius: This code does temperature conversion from Fahrenheit scale to Celsius scale.in java: Write a program that reads the following information and prints a payroll statement: Employee’s name (e.g., Smith) Number of hours worked in a week (e.g., 10) Hourly pay rate (e.g., 9.75) Federal tax withholding rate (e.g., 20%) State tax withholding rate (e.g., 9%) Your program must use proper formatting for the output either by using the printf command or String.formatWrite an application that allows you to enter nine(and only nine, no more no less) integers and displays the values, their mean, and their median. (Java)