Follow us on Twitter!
Understanding is the answer, hatred is the problem, and hackers are the slaves abused and destroyed in the process of peace online - Deshouleres
Friday, April 25, 2014
Navigation
Home
HellBoundHackers Main:
HellBoundHackers Find:
HellBoundHackers Information:
Learn
Communicate
Submit
Shop
Challenges
HellBoundHackers Exploit:
HellBoundHackers Programming:
HellBoundHackers Think:
HellBoundHackers Track:
HellBoundHackers Patch:
HellBoundHackers Other:
HellBoundHackers Need Help?
Other
Members Online
Total Online: 20
Guests Online: 20
Members Online: 0

Registered Members: 82908
Newest Member: krishna7799
Latest Articles
View Thread

HellBound Hackers | Computer General | Programming

Author

assignment!!


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 21-10-06 13:11
guys i am a bigenner in C++ programming, or null Pfft
so i need your help with this assignment. i find it very difficult to solve but i think it is very easy for u to solve. here it is

Description
The first three minutes of an international telephone call cost $8.
Each additional minute costs $4.

On the other hand, each loacal telephone call costs 2$ per minute plus 10% taxes on the total.

Given the length of a call in minutes and the type of the call(local or international), write a program that calculates and prints the total cost of the call. Additionally, your program should compute the number of 100$ ,50$,20$,10$,5$, 1$ bills to be payed for the call.

The program input includes:
 The length of a call in minutes
 The type of the call: The user will input 1 for Local and 2 for International.

The program output includes:
 the total amount to be payed
 The number of bills to be given from each category.

Use integer (int) data type for all your variables, do not worry about truncations.
Author

RE: assignment!!


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 21-10-06 13:17
 The length of a call in minutes
This can obviously be determined at run-time or defined before hand;

 The type of the call: The user will input 1 for Local and 2 for International.
Read in an int and use a switch() statement;

 the total amount to be payed
Obviously just a simple arithmetic statement to determine the total based upon the type/length;

 The number of bills to be given from each category.
For figuring this out you will need to make use of the modulo operator (%);

If you need help with your current code, I'd be more than glad to help you fix your code/assist you. If you need a quick example for certain aspects I am also willingly to supply them.

Cheers,
T-Metal