Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Date: Lab Objectives This lab was designed to reinforce the following programming concepts: Using repetition structures Using decision making Using L/O files. xercise#1: Counting Number

image text in transcribed

Date: Lab Objectives This lab was designed to reinforce the following programming concepts: Using repetition structures Using decision making Using L/O files. xercise#1: Counting Number of Digits Write a Java program that inputs one integer number from the user, determine the number af individual digits and prin the number of digits and the digits separated from one another by a tab space. For example, if the user types in the numb 42339, the program should print "There are 5 digits, which are 42 3 39 Sample Input/Output KnLer ar integer value: 123456 Ther a ats, wrich are( 2 3 5 6 7 B num/ e 113 Exercise#2: Sales s maorder house sells fve products whose retail arices are as follaws: Procuct i. $3,a; pr producL 3 .. yg . E Ledus t e . a 3 and product S 36 . oduct. 2, $4,5 B7. Write a Java program that reads a scries of pairs as fallows: pnnduct umber and roact name. Ime quantity sold isgenerated at random between 0 vElur sl alfl praduc:s sold as sho witch statement to deternine the rerail crice for each product. It should calculate and display the total retail in the sample autout. The loop should stop laoping when there is ns inout. The input is staredin an input file. Sample input file(call it 8a ' es ' t 1 paak Sample Output 4 paper pak Erapier 45 229.2 21 .50 anlaring hok Total Sale::S2009

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

T Sql Fundamentals

Authors: Itzik Ben Gan

4th Edition

0138102104, 978-0138102104

More Books

Students also viewed these Databases questions

Question

4. What are the current trends in computer software platforms?

Answered: 1 week ago