Click here to Skip to main content
15,922,696 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Array size Pin
hint_5415-Mar-06 13:34
hint_5415-Mar-06 13:34 
Questionbeginner ask for DirectX Pin
Karlzheng14-Mar-06 13:35
Karlzheng14-Mar-06 13:35 
QuestionDual language GUI Pin
JBAK_CP14-Mar-06 12:47
JBAK_CP14-Mar-06 12:47 
AnswerRe: Dual language GUI Pin
Maximilien14-Mar-06 13:50
Maximilien14-Mar-06 13:50 
Questionhow to disable Close button? Pin
includeh1014-Mar-06 12:37
includeh1014-Mar-06 12:37 
AnswerRe: how to disable Close button? Pin
Nibu babu thomas14-Mar-06 16:55
Nibu babu thomas14-Mar-06 16:55 
AnswerRe: how to disable Close button? Pin
ThatsAlok14-Mar-06 18:14
ThatsAlok14-Mar-06 18:14 
Questionneed code for PhoneCall program Pin
calizdesi14-Mar-06 11:36
calizdesi14-Mar-06 11:36 
i got this as my class assignment. i am having hard time figuring this out im new to programming scene so please help...the instructions go as following:


The New Telephone Company has the following rate structure for long-distance calls:

The regular rate for a call is $0.20 per minute.

Any call started at or after 6:00 p.m. (1800 hours) but before 8:00 a.m. (800 hours) is discounted 50 percent for off-peak hours.

Any call longer than 60 minutes receives a 15 percent discount on it cost (after off-peak hours discount is subtracted)

All calls are subject to a 4 percent federal tax on their final cost.



Write a program that reads
The start time for a call based on a 24-hour clock
(Note: you only need start time and don’t need the end time)
The length of the call (number of minutes).

Your program needs to check for illegal inputs
Number of minutes cannot be 0 or negative
The start time for a call cannot be less than 0 or greater than 2359. Also the start time cannot be
1263, 885, 2099, etc… (WHY?)

If there is any error, print the appropriate error message and end the program by return -1.
(Note: you can put a return statement anywhere inside your program, when return statement is executed, the program will end.)

Finally, the program will print the following results:
The gross cost (before any discount or tax)
The net cost (after discounts are deducted)
The Final cost (with tax added).

Test your program with all scenarios. Illegal minutes, illegal starting time, regular call under an hour, regular call over an hour, off-peak call under an hour, off-peak call over an hour, 60 minute off-peak call,
60 minute peak time call………….etc………..

any help would be appreciated.
AnswerRe: need code for PhoneCall program Pin
hint_5414-Mar-06 13:56
hint_5414-Mar-06 13:56 
GeneralRe: need code for PhoneCall program Pin
calizdesi15-Mar-06 12:52
calizdesi15-Mar-06 12:52 
GeneralRe: need code for PhoneCall program Pin
hint_5415-Mar-06 13:22
hint_5415-Mar-06 13:22 
Questionifstream issue in Visual C++ .NET 2005 Pin
yellowine14-Mar-06 10:20
yellowine14-Mar-06 10:20 
AnswerRe: ifstream issue in Visual C++ .NET 2005 Pin
PJ Arends14-Mar-06 10:26
professionalPJ Arends14-Mar-06 10:26 
GeneralRe: ifstream issue in Visual C++ .NET 2005 Pin
yellowine14-Mar-06 10:32
yellowine14-Mar-06 10:32 
AnswerRe: ifstream issue in Visual C++ .NET 2005 Pin
PJ Arends14-Mar-06 10:40
professionalPJ Arends14-Mar-06 10:40 
GeneralRe: ifstream issue in Visual C++ .NET 2005 Pin
yellowine14-Mar-06 10:44
yellowine14-Mar-06 10:44 
QuestionMaking an Object global Pin
viperlogic14-Mar-06 10:18
viperlogic14-Mar-06 10:18 
AnswerRe: Making an Object global Pin
BadKarma14-Mar-06 10:29
BadKarma14-Mar-06 10:29 
GeneralRe: Making an Object global Pin
viperlogic14-Mar-06 11:27
viperlogic14-Mar-06 11:27 
AnswerRe: Making an Object global Pin
Stephen Hewitt14-Mar-06 17:18
Stephen Hewitt14-Mar-06 17:18 
AnswerRe: Making an Object global Pin
ThatsAlok14-Mar-06 18:20
ThatsAlok14-Mar-06 18:20 
AnswerRe: Making an Object global Pin
ThatsAlok14-Mar-06 18:22
ThatsAlok14-Mar-06 18:22 
GeneralRe: Making an Object global Pin
viperlogic14-Mar-06 23:23
viperlogic14-Mar-06 23:23 
GeneralRe: Making an Object global Pin
Stephen Hewitt15-Mar-06 0:06
Stephen Hewitt15-Mar-06 0:06 
GeneralRe: Making an Object global Pin
viperlogic15-Mar-06 2:22
viperlogic15-Mar-06 2:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.