Answered step by step
Verified Expert Solution
Question
1 Approved Answer
please write the code in java. please include :java.util.Scanner Scanner input=new Scanner(System.in) JAVA Console Caam Project: YourName_ Pack 1 grams) (class: YourName_LbToKg) Write a program
please write the code in java. please include :java.util.Scanner Scanner input=new Scanner(System.in)
JAVA Console Caam Project: YourName_ Pack 1 grams) (class: YourName_LbToKg) Write a program that converts pounds into ograms. The program prompts the user to enter verts it to kilograms, and displays the result. One pound is 0.454 kilogram. Here is a sample run: Enter a number in pounds: 55.5 55.5 pounds is 25.197 kilograms 5. *(Financial application: calculate tips) (elass: YourNam program that reads the subtotal and the gratuitbtotal a gratuity and total. For example, if the user enters for gratuity rate, the program displays $1.5 as gratuity and rate, then computes the for subtotal and 15% $11.5 as total asample run program Enter the subtotal and a gratuity rate: 10 15 Emer The gratuity is $1.5 and total is $11.5 6. *(Sum the digits in an integer) (class: YourName SumDigits) Write a program that reads an integer between 0 and 1000 and adds all the digits in the integer. For example, if an integer is 932, the sum of all its digits is 14. Hint: Use the % operator to extract digits, and use the l operator to remove the extracted digit. For instance, 932 % 10-2 and 932 / 10-93 Enter a number between 0 and 1000:999 Enter The sum of the digits is 27Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started