Sunday, September 1, 2019

                                                                 E-BOX                                                               

                           BASICS OF C PROGRAMMING                                            

I/O Statements,Operators And Expressions - Code Analysis

PROGRAM - 2 : 


GROCERY SHOP

 

A new grocery shop has to be opened. The owner asks the accontant to take a print of price list of the items to be sold in the store. The bill should have the details of the item and its cost. The items that the owner decides to sell initially are A4sheets, pen, pencil and eraser. The accountant is an experienced person and he very well knows that more number of items will be added to the list as the business picks. The accontant is well versed in programming and he decides to write a program to generate the price list.

Can you please help him do it?

 Input Format :

 Input consists of four integers corresponding to cost of A4sheet , pen, pencil and eraser.

Output Format :

Display all the items with its cost.

[All text in bold corresponds to input and the rest corresponds to output.]

 

Sample Input and output :

Cost of A4sheet:

40

Pen:

20

Pencil:

10

Eraser:

5

Items Details

A4sheet:40

Pen:20

Pencil:10

Eraser:5


SOLUTION :




No comments:

Post a Comment

                                                 E-BOX                                                     BASICS OF C PROGRAMMING       i -...

https://amzn.to/2LAmadv