#include<stdio.h>
int main()
{ int cp,pin;
int a,add,option,with;
printf(" WELCOME IN THIS ATM \n\n");
printf(" \nAt first you create a pin to secure your accout\n");
scanf("%d",&cp);
printf(" Thank you to create pin \n");
start:
printf(" Enter pin ");
scanf("%d",&pin);
if(pin==cp)
{
printf(" \n\nAdd some money because this is first time ");
scanf("%d",&a);
do
{ printf(" \n This is your home screen \n");
printf("\n1. balance enquiry \n2. add money \n3. money withdraw \n4. exit \n5. Out this Program \n ");
scanf("%d",&option);
switch(option)
{
case 1:{
printf("\n Your balance is %d ",a);
break;
}
case 2:{
printf("\n Add money = ");
scanf("%d",&add);
a=a+add;
printf(" \nNow your current balance is %d ",a);
break;
}
case 3:{
printf(" \Enter money to withdraw ");
scanf("%d",&with);
if(with>a)
printf("\n You have no sufficient money for withdraw ");
else
{
a=a-with;
printf("\n Now you receive %d rupess and now your current balance is %d ",with,a);
}
break;
}
case 4:
goto start;
case 5: goto end;
default: printf("\n choose the uper option \n");
}
}while(option<4);
}
else
{
printf("\n you enter a wrong pin so try it \n");
goto start;
}
end:
return 0;
}
Anupam Guin
Thursday, September 5, 2019
#include<stdio.h>
#include<conio.h>
int main()
{
int a,b,c,d,e;
char m,n,name[20];
clrscr();
printf(" ****************** WELCOME IN MIND READER GAME *******************\n\n");
printf(" ........................Now I Will Control Your Mind......................\n\n");
printf("____________ You read all the line Carefully in this Program_______________\n\n");
printf("****************************** START ******************************\n\n\n");
printf("\nPlease Enter Your name : ");
gets(name);
printf("\n\n\n For Start this game You enter any one digit number : ");
scanf("%d",&a);
if(a>=0&&a<=9)
{
printf("\n\n\n ___________________ NOW YOU THINK A NUMBER IN YOUR MIND _________________\n\n");
}
else
{
printf("\n\n You are not Enter any One digit No .. Ok no Problem !!");
printf("\n\n__________________NOW YOU THINK A NUMBER IN YOUR MIND ____________________\n\n");
}
printf("\n\n Now Enter any One digit No to continue the Game : ");
scanf("%d",&b);
if(b>=0&&b<=9)
{
printf("\n\n\n_________________NOW YOU COUNT YOUR NUMBER TWO TIMES MEANS ( your no which you think in your mind * 2 )\n\n");
}
else
{
printf(" \n\n You are not enter any one digit number \n\n");
printf("\n _________NOW YOU COUNT YOUR NUMBER TWO TIMES MEANS ( your no * 2)____________\n\n");
}
printf("\n\n Enter any one digit number to Continue the Game ");
scanf("%d",&c);
if(c>=0&&c<=9)
{
d=a+b+c;
if(d%2==0)
{
if(d<=10&&d>0)
e=d;
else if(d==0)
e=6;
else if(d>10&&d<=20)
e=d-8;
else
e=d-16;
}
else
{
if(d>0&&d<=10)
e=d+1;
else if(d>10&&d<20)
e=d+1;
else
e=d-7;
}
}
else
{
printf("\n\n You are not Enter any One digit no\n\n");
e=10;
}
printf("\n\n\n______________________NOW ADD %d WITH YOUR NEW VALUE____________________\n\n",e);
fflush(stdin);
printf("\n\n TO Continue this game Please press Y : ");
scanf("%c",&m);
if(m=='y'||m=='Y')
{
printf("\n\n\n ________________ NOW YOU DEVIDE 2 WITH YOUR PREVIOUS VALUE_______________\n\n");
}
else
{
printf(" \n\nYou are not Enter Y.....But no Problem\n ");
printf("_______________________NOW YOU DEVIDE 2 WITH YOUR PREVIOUS VALUE________________\n\n");
}
printf("\n\n\n______________Now Your Value is to Subtracted by the first number which you thought first time____________\n\n");
printf("\n\n\n Now I told You the answer \n\n ");
fflush(stdin);
printf("\n\n Enter Y to know Your answer : ");
scanf("%c",&n);
if(n=='y'&&n=='Y')
{
printf("\n\n\n @@@@@@@@@@@@@@@@@@@@@ NOW YOUR ANSWER IS %d @@@@@@@@@@@@@@@@@@@@@@",e/2);
printf("\n\n Was it Right ");
}
else
{
printf(" You are not entered Y key ....... But no problem \n\n");
printf(" \n @@@@@@@@@@@@@@@@@@@ NOW YOUR ANSWER IS %d @@@@@@@@@@@@@@@@@@@@\n\n",e/2);
}
printf(" I hope that You got the answer %s \n\n\n",name);
printf("__________________________ THANK YOU %s__________________\n\n",name);
getch();
return 0;
}
Subscribe to:
Posts (Atom)
ATM Program by Anupam Guin
#include<stdio.h> int main() { int cp,pin; int a,add,option,with; printf(" WELCOME IN THIS ATM ...
-
#include<stdio.h> int main() { int cp,pin; int a,add,option,with; printf(" WELCOME IN THIS ATM ...
-
#include<stdio.h> #include<conio.h> int main() { int a,b,c,d,e; char m,n,name[20]; clrscr(); printf(" *****************...