Question: in java Write a program that takes a string and an integer as input, and outputs a sentence using the input values as shown in

in java Write a program that takes a string and an integer as input, and outputs a sentence using the input values as shown in the example below. The program repeats until the input string is quit and disregards the integer input that follows.
Ex: If the input is:
apples 5shoes 2quit 0
the output is:
Eating 5apples a day keeps you happy and healthy. Eating 2shoes a day keeps you happy and healthy.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Programming Questions!