What's new

Saang lines po nagkamali? programming quiz!

Puro syntax error..Aralin mo lang syntax..mas matututo ka kung makabisado mo syntax..Mas mahirap problem solving kesa syntax analysis.. Good luck!
 
C:
#include <stdio.h>
int main ();
{
 int bal = 10000;
 int pin, choice deposit, wí†hdráw;
printf("enter your four digit pin: ");
 scanf("%d, &pin");
 while (pin == 9999)
 {
 printf("welcome please choose an action: \n");
 printf("1 - balance inquiry\n");
 printf("2 - wí†hdráw\n");
 printf("3 - deposit\n");
 printf("4 - exit\n");
 scanf("%d", &choice);
 if(choice == 1)
 }
 printf("\n your available balance is: %d", bal);
 break:
 {
 else if(choice == 2)
}
 printf("\n enter amount to wí†hdráw: ");
 scanf("%d", &wí†hdráw);
 while (wí†hdráw <== bal)
 {
 bal = bal - wí†hdráw;
 printf("\n wí†hdráw successful, your new balance is: %d \n", $bal);
 break;
 }
 break;
 {
 else if(choice == 3)
 {
 printf("\namount to be deposited: ");
 scanf("%d". &deposit);
 bal = bal + deposit;
 printf("\n your new balance is: %d \n", bal);
 break;
 }
 else if(choice == 4)
 {
 break:
 }
 {
}
 
Screenshot_20210304-001023.jpg

Ikaw na bahala ts humanap nyan hahhaa
 

Attachments

Hindi ako magaling sa C eh pero try mo yan kung nafix ko


[CODE lang="c" title="Answer?"]#include <stdio.h>
int main() {
int bal = 10000;
int pin, choice, deposit, wí†hdráw;
printf("enter your four digit pin: ");
scanf("%d", &pin);
while (pin == 9999)
{
printf("welcome please choose an action: \n");
printf("1 - balance inquiry\n");
printf("2 - wí†hdráw\n");
printf("3 - deposit\n");
printf("4 - exit\n");
scanf("%d", &choice);
if(choice == 1)
{
printf("\n your available balance is: %d", bal);
break;
}
else if(choice == 2)
{
printf("\n enter amount to wí†hdráw: ");
scanf("%d", &wí†hdráw);
while (wí†hdráw == bal)
{
bal = bal - wí†hdráw;
printf("\n wí†hdráw successful, your new balance is: %d \n", bal);
break;
}
}
else if(choice == 3)
{
printf("\n amount to be deposited: ");
scanf("%d", &deposit);
bal = bal + deposit;
printf("\n your new balance is: %d \n", bal);
break;
}
else if(choice == 4)
{
break;
}
}
}[/CODE]
 
that's the importance of white spaces..para madali mo ma-trace mga missing or complete statements
 

Similar threads

Back
Top