Hello, and let me first start off by saying thanks for taking the time to read this.
I have a program just about made up. It compiles almost all the way. Can a.out to an extend, only issue at the moment is
And I am quite stumped as to what it is I need to do to fix this.
Here is the program so far.
I have a program just about made up. It compiles almost all the way. Can a.out to an extend, only issue at the moment is
Code:
Line 42: Statement Not Reached
Here is the program so far.
Code:
#include<stdio.h>
#include<stdlib.h>
int main()
{
char option, pin, transaction;
int deposit, withdraw;
option='0';
printf("Welcome To Ian's Bank!\n");
printf("----------------\n\n");
printf("Main Menu\n");
printf("----------------\n");
printf("1)Enter Pin #\n");
printf("2)Exit\n");
printf("----------------\n\n");
scanf("%c", &option);
{
system("cls");
printf("Pin Number Verification\n");
printf("----------------\n\n");
printf("Please Enter Your Pin Number: ");
scanf("%s", &pin);
//if(inputfile ==NULL)
{
printf("Unable to open input file\n");
}
return 1;
{
system("cls");
printf("Transactions\n");
printf("---------------\n");
printf("1)Deposit\n2)Withdraw\n3)Statement\n4)Exit\n");
printf("---------------\n");
scanf("%s",&transaction);
}
}
if(transaction =='1')
{
system("cls");
printf("Deposit\n");
printf("-------------\n\n");
printf("Please enter the amount of money you would like to deposit:");
scanf("%d", &deposit);
}
if(transaction=='2')
{
system("cls");
printf("withdraw\n");
printf("---------------\n\n");
printf("Please enter the amount of money you would like to withdraw:");
scanf("%d", &withdraw);
}
if(transaction=='3')
{
system("cls");
printf("Statement\n");
printf("----------------\n\n");
}
return 0;
}
Comment