What's new

Help C Programming ( Press [Y] to continue, [X] to exit...)

Status
Not open for further replies.

xSilent

Forum Expert
Joined
Aug 28, 2013
Posts
5,963
Reaction
21,136
Points
3,273
Pa help po nito mga bossing :D

Code:
Press [Y] to continue, [X] to exit...

pano po yan iprogram? :D

mali mali kasi saken eh.. di daw pwede ma convert into "int" :(
sana po may maka tulong
 
int main()
{
char choice; //declaration

printf("Press [Y] to continue, [X] to exit");

switch(choice)
{
case 'Y':
case 'y': (put your function calls or continuation statements here)
break;
case 'X':
case 'x': exit();
break;
default: printf("Invalid Choice");
}
return 0;
}
 
int main()
{
char choice; //declaration

printf("Press [Y] to continue, [X] to exit");

switch(choice)
{
case 'Y':
case 'y': (put your function calls or continuation statements here)
break;
case 'X':
case 'x': exit();
break;
default: printf("Invalid Choice");
}
return 0;
}
try ko to mamaya :D sana mag work ^_^ salamat bossing (y) di ko kasi ma do..while eh.. di din ma if() :dead:
sana ma ok na to :D
 
pwede mo din ilagay sa loob ng do-while loop ang switch statement (y)
ahh sge po.. do-while, for(;;), while(), nested loops, pa lang po kasi tinuro sa amin eh..

may gotoxy pa kami.. baka advance lang to masyado XD eto sakin eh
Code:
  xxx=(80-strlen("Another Entry? [Y] or [N]:  "))/2;
  gotoxy(xxx,20);printf("Another Entry? [Y] or [N]: ");
  gotoxy(1,21);
    for(u=1;u<75;u++)printf("-");
  gotoxy(26,20);gets(tryy[i]);
    ex=toupper(tryy[i][0]);
    ex=atoi(tryy[i][0]);
    if(ex=='X')break;
    if(ex=='Y')continue;

kaso di daw ma convert into "int" ang "char"
 
Status
Not open for further replies.

Similar threads

Back
Top