haseeb
2012-12-25 12:41:40 UTC
#include
int main()
{
int a;
int b;
int c;
while(1)
{
printf("What do you want to do: Press 1 for transaction, 2 for cash withdrawal, 3 for quit\n");
scanf("%d",&a);
if (a==1)
{
printf("You want to transact money\n");
printf("Write your amount");
scanf("%d",&b);
}
if (a==2)
{
printf("Write your amount");
scanf("%d",&c);
if(c<200 || c>200000)
printf("amount invalid");
else
printf("%d",c);
}
if(a==3)
break;
printf("Do you want to continue press y or n?");
while(scanf("%c")=='\n')
scanf("%c",&b);
if(b=='y')
continue;
if(b=='n')
break;
}
}