Click here to Skip to main content
15,916,188 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: array values? Pin
valikac27-Apr-06 11:56
valikac27-Apr-06 11:56 
GeneralRe: array values? Pin
dSolariuM27-Apr-06 20:04
dSolariuM27-Apr-06 20:04 
Questionclass problem Pin
Mayer_yr27-Apr-06 10:19
Mayer_yr27-Apr-06 10:19 
AnswerRe: class problem Pin
Nemanja Trifunovic27-Apr-06 11:26
Nemanja Trifunovic27-Apr-06 11:26 
Questionvolume keys PPC 2003 Pin
Alberto Galvan27-Apr-06 10:19
Alberto Galvan27-Apr-06 10:19 
AnswerRe: volume keys PPC 2003 Pin
Michael Dunn27-Apr-06 19:52
sitebuilderMichael Dunn27-Apr-06 19:52 
GeneralRe: volume keys PPC 2003 Pin
Galvanoski28-Apr-06 11:21
Galvanoski28-Apr-06 11:21 
QuestionProject Help Pin
Door Mat27-Apr-06 9:45
Door Mat27-Apr-06 9:45 
This is supposed to simulate a pay telephone

It's not working right for me.

Won't add the time and money.

Any help would be greatly appreciated.

Thanks

#include <stdio.h>
#include <ctype.h>

main ()
{

int coin, total = 0, time=0;
int type;



do

{

printf("\nPlease enter a coin\n(10,20,50)\n[0 to quit]:\n");
scanf("%d",&coin);


if (coin == 10||coin == 20 || coin == 50);
total = total + coin;

} while(coin!=0);

display_time(int total,char type);

printf("\nPlease enter the type of call you wish to make,\n 'L' for local,\n 'T' for trunk,\n 'I' for international:\n");
fflush(stdin);
scanf("%c",&type);
type = toupper;

{
if( type == 'L')
time = (total/10)*30;


if (type == 'T')
time=(total/10)*15;


if (type == 'I')
time=(total/10)*5;



}
printf("Total credits allowed : % d\n\n", total);

printf("You have %d seconds of call time\n\n",time);

main();
{
int total;
char type;

total = getcoin();

type = gettype();

display_time(total,type);

}

}
AnswerRe: Project Help Pin
David Crow27-Apr-06 9:51
David Crow27-Apr-06 9:51 
GeneralRe: Project Help Pin
Door Mat27-Apr-06 10:24
Door Mat27-Apr-06 10:24 
QuestionRe: Project Help Pin
David Crow27-Apr-06 10:44
David Crow27-Apr-06 10:44 
QuestionEvil Circular dependency problem Pin
chasetoys27-Apr-06 9:16
chasetoys27-Apr-06 9:16 
AnswerRe: Evil Circular dependency problem Pin
David Crow27-Apr-06 9:48
David Crow27-Apr-06 9:48 
GeneralRe: Evil Circular dependency problem Pin
chasetoys27-Apr-06 9:50
chasetoys27-Apr-06 9:50 
GeneralRe: Evil Circular dependency problem Pin
David Crow27-Apr-06 9:53
David Crow27-Apr-06 9:53 
GeneralRe: Evil Circular dependency problem Pin
Rilhas29-Apr-06 13:54
Rilhas29-Apr-06 13:54 
QuestionApplication stay on top of another application (not all windows) Pin
pince27-Apr-06 7:49
pince27-Apr-06 7:49 
AnswerRe: Application stay on top of another application (not all windows) Pin
David Crow27-Apr-06 8:16
David Crow27-Apr-06 8:16 
GeneralRe: Application stay on top of another application (not all windows) Pin
pince27-Apr-06 9:01
pince27-Apr-06 9:01 
GeneralRe: Application stay on top of another application (not all windows) Pin
David Crow27-Apr-06 9:26
David Crow27-Apr-06 9:26 
GeneralRe: Application stay on top of another application (not all windows) Pin
pince27-Apr-06 12:12
pince27-Apr-06 12:12 
Questionhow to make your edit control accept only capital letters Pin
elephantstar27-Apr-06 6:45
elephantstar27-Apr-06 6:45 
AnswerRe: how to make your edit control accept only capital letters Pin
toxcct27-Apr-06 6:54
toxcct27-Apr-06 6:54 
GeneralRe: how to make your edit control accept only capital letters Pin
elephantstar27-Apr-06 7:41
elephantstar27-Apr-06 7:41 
AnswerRe: how to make your edit control accept only capital letters Pin
valikac27-Apr-06 7:03
valikac27-Apr-06 7:03 

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.