Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a C program to calculate a total price of books sold in three weeks. The program accepts two command line arguments, The first argument

Write a C program to calculate a total price of books sold in three weeks. The program accepts two command line arguments, The first argument is the name of a disk file The second argument is the name of an output disk file.

Here is the record of books sold in three weeks:

Python for Beginners:week1=10 , week2=12, week3=15 Adv. Ruby : week1=20 , week2 =16, week3= 8 Java programming: week1=14 , week2=12, week3= 18 Assume the price of all books (Python, Java, Ruby) sold in the first week is $20.0,

the price of books sold in the second week is $30.0, and the price of books sold

in the third week is $40.0 Here is the format of input file based on record of books sold in three weeks

Python for Beginners, 10, 12, 15 Adv. Ruby , 20, 16, 8 Java programming, 14, 12, 18

1 You need to write a function to read record of books sold from input file and print it on the console 2 You need to write a function to calculate total price of Python, Ruby, and Java books sold. Total= week1*20.0+week2*30.0+week3*40.0

The format of output file should look like: Python for Beginners: 1160 Adv. Ruby: 1200 Java programming: 1360

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_2

Step: 3

blur-text-image_3

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

Database Design Query Formulation And Administration Using Oracle And PostgreSQL

Authors: Michael Mannino

8th Edition

1948426951, 978-1948426954

Students also viewed these Databases questions

Question

In an Excel Pivot Table, how is a Fact/Measure Column repeated?

Answered: 1 week ago