Question: Write a program that calculates and prints, the sum and product of all the digits in a floating-point number value read from the keyboard.

Write a program that calculates and prints, the sum and product of all the digits in a floating-point number

Write a program that calculates and prints, the sum and product of all the digits in a floating-point number value read from the keyboard. User should enter the floating-point number having 3-digit Integer and 4-digit fractional parts separated by comma (), e.g., 123,5641 Analyze the sample program output given below; and Implement the program printing in the same format Hint: Use Integer.parseInt() to convert from string to Integer. Sample Output: Enter the real number: 345,2233 Sun of digits: 22 Product of digits: 2160 Question 2 [35 pts] Write a Java program Bakery jave that computes the estimated revenue. First, the program reads the number of croissants, the number of muffins, the number of breads, the number of ples and the number of loafs corresponding to the consumed items per week in a format C/M/B/P/L (the length of each part can vary). Unit price of each item is given in the following table. Croissant Muffin Bread Pie Loaf 5.0 TL 5.0 TL 20 TL 10.0 TL 8.0 TL Enter the real number: 390,1240 Sum of digits: 19 Product of digits: 0. Finally, the program computes the estimated revenue of the bakery per month and per year. Analyze the sample program output given below, and implement the program printing in the same format. Please note that a month is 30 days. Hint: Use Integer.parseInt() to convert from string to integer. Sample Output: Enter Number of Items (C/M/B/P/L):120/100/200/30/10 Croissant: 120 Muffin: 100 Bread: 200 Pie: 30 Loaf: 10 Monthly Revenue: 8057.142857142857 TL Annual Revenue: 98028.57142857142 TL Question 3 [35 pts] Write a program that generates an automatic email password. The program asks user to enter name and sumame as text and year of birth as integer. Then it creates the user's password in the following format Sample Output: The last character of the name in uppercase The last three characters of surname in lowercase The last two digits of the year of birth Name Kirby Surname 1SPINK Year: 1957 PSD:Vink57 Write a program that calculates and prints, the sum and product of all the digits in a floating-point number value read from the keyboard. User should enter the floating-point number having 3-digit Integer and 4-digit fractional parts separated by comma (), e.g., 123,5641 Analyze the sample program output given below; and Implement the program printing in the same format Hint: Use Integer.parseInt() to convert from string to Integer. Sample Output: Enter the real number: 345,2233 Sun of digits: 22 Product of digits: 2160 Question 2 [35 pts] Write a Java program Bakery jave that computes the estimated revenue. First, the program reads the number of croissants, the number of muffins, the number of breads, the number of ples and the number of loafs corresponding to the consumed items per week in a format C/M/B/P/L (the length of each part can vary). Unit price of each item is given in the following table. Croissant Muffin Bread Pie Loaf 5.0 TL 5.0 TL 20 TL 10.0 TL 8.0 TL Enter the real number: 390,1240 Sum of digits: 19 Product of digits: 0. Finally, the program computes the estimated revenue of the bakery per month and per year. Analyze the sample program output given below, and implement the program printing in the same format. Please note that a month is 30 days. Hint: Use Integer.parseInt() to convert from string to integer. Sample Output: Enter Number of Items (C/M/B/P/L):120/100/200/30/10 Croissant: 120 Muffin: 100 Bread: 200 Pie: 30 Loaf: 10 Monthly Revenue: 8057.142857142857 TL Annual Revenue: 98028.57142857142 TL Question 3 [35 pts] Write a program that generates an automatic email password. The program asks user to enter name and sumame as text and year of birth as integer. Then it creates the user's password in the following format Sample Output: The last character of the name in uppercase The last three characters of surname in lowercase The last two digits of the year of birth Name Kirby Surname 1SPINK Year: 1957 PSD:Vink57

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Program import javautil public class Calculation public static void mainString args Scanner sc new ScannerSystemin SystemoutprintEnter the real number String valuescnextLine input the real number from ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Computer Network Questions!