Inventory Total Cost

Programming Interview Medium 7 views
Back to Questions

Problem Description

We have {x}. Create Item class with total() method. Output grand total cost.

Input Format

First line n. Next n lines: name price qty.

Output Format

One integer total cost.

Sample Test Case

Input:
3 pen 10 2 book 50 1 eraser 5 3
Output:
85

Constraints

1

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next