Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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 27

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Beginning Microsoft SQL Server 2012 Programming

Authors: Paul Atkinson, Robert Vieira

1st Edition

1118102282, 9781118102282

More Books

Students also viewed these Databases questions

Question

Explain the market segmentation.

Answered: 1 week ago

Question

Mention the bases on which consumer market can be segmented.

Answered: 1 week ago

Question

Question Who can establish a Keogh retirement plan?

Answered: 1 week ago