Advertisement
Guest User

Untitled

a guest
Mar 24th, 2018
744
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 21.09 KB | None | 0 0
  1.  
  2. Conversation opened. 1 unread message.
  3.  
  4. Skip to content
  5. Using Gmail with screen readers
  6. Search
  7.  
  8.  
  9.  
  10. Gmail
  11. COMPOSE
  12. Labels
  13. Inbox
  14. Starred
  15. Sent Mail
  16. Drafts
  17. Junk
  18. More
  19.  
  20.  
  21.  
  22. More
  23. 1 of 23
  24.  
  25. Print all In new window
  26. Fwd:
  27. Inbox
  28. x
  29.  
  30. Anika Tahsin <anikameem9@gmail.com>
  31. Attachments2:32 AM (0 minutes ago)
  32.  
  33. to me
  34.  
  35. ---------- Forwarded message ---------
  36. From: dipta nath <diptanath44@gmail.com>
  37. Date: Thu, Aug 3, 2017, 8:51 PM
  38. Subject:
  39. To: Anika Tahsin <anikameem9@gmail.com>
  40.  
  41.  
  42. Simple book library project
  43.  
  44. Attachments area
  45.  
  46. Click here to Reply or Forward
  47. 0.01 GB (0%) of 15 GB used
  48. Manage
  49. Terms - Privacy
  50. Last account activity: in 4 minutes
  51. Details
  52.  
  53. #include<stdio.h>
  54. #include<stdlib.h>
  55. #include<windows.h>
  56. int i,j;
  57. int main_exit;
  58. void menu();
  59. struct date{
  60. int month,day,year;
  61.  
  62. };
  63. struct {
  64.  
  65. char name[60];
  66. int acc_no,age;
  67. char address[60];
  68. char citizenship[15];
  69. double phone;
  70. char acc_type[10];
  71. float amt;
  72. struct date dob;
  73. struct date deposit;
  74. struct date withdraw;
  75.  
  76. }add,upd,check,rem,transaction;
  77.  
  78. float interest(float t,float amount,int rate)
  79. {
  80. float SI;
  81. SI=(rate*t*amount)/100.0;
  82. return (SI);
  83.  
  84. }
  85. void fordelay(int j)
  86. { int i,k;
  87. for(i=0;i<j;i++)
  88. k=i;
  89. }
  90.  
  91. void new_acc()
  92.  
  93. {
  94. int choice;
  95. FILE *ptr;
  96.  
  97. ptr=fopen("record.dat","a+");
  98. account_no:
  99. system("cls");
  100. printf("\t\t\t\xB2\xB2\xB2\ ADD RECORD \xB2\xB2\xB2\xB2");
  101. printf("\n\n\nEnter today's date(mm/dd/yyyy):");
  102. scanf("%d/%d/%d",&add.deposit.month,&add.deposit.day,&add.deposit.year);
  103. printf("\nEnter the account number:");
  104. scanf("%d",&check.acc_no);
  105. while(fscanf(ptr,"%d %s %d/%d/%d %d %s %s %lf %s %f %d/%d/%d\n",&add.acc_no,add.name,&add.dob.month,&add.dob.day,&add.dob.year,&add.age,add.address,add.citizenship,&add.phone,add.acc_type,&add.amt,&add.deposit.month,&add.deposit.day,&add.deposit.year)!=EOF)
  106. {
  107. if (check.acc_no==add.acc_no)
  108. {printf("Account no. already in use!");
  109. fordelay(1000000000);
  110. goto account_no;
  111.  
  112. }
  113. }
  114. add.acc_no=check.acc_no;
  115. printf("\nEnter the name:");
  116. scanf("%s",add.name);
  117. printf("\nEnter the date of birth(mm/dd/yyyy):");
  118. scanf("%d/%d/%d",&add.dob.month,&add.dob.day,&add.dob.year);
  119. printf("\nEnter the age:");
  120. scanf("%d",&add.age);
  121. printf("\nEnter the address:");
  122. scanf("%s",add.address);
  123. printf("\nEnter the citizenship number:");
  124. scanf("%s",add.citizenship);
  125. printf("\nEnter the phone number: ");
  126. scanf("%lf",&add.phone);
  127. printf("\nEnter the amount to deposit:$");
  128. scanf("%f",&add.amt);
  129. printf("\nType of account:\n\t#Saving\n\t#Current\n\t#Fixed1(for 1 year)\n\t#Fixed2(for 2 years)\n\t#Fixed3(for 3 years)\n\n\tEnter your choice:");
  130. scanf("%s",add.acc_type);
  131.  
  132. fprintf(ptr,"%d %s %d/%d/%d %d %s %s %lf %s %f %d/%d/%d\n",add.acc_no,add.name,add.dob.month,add.dob.day,add.dob.year,add.age,add.address,add.citizenship,add.phone,add.acc_type,add.amt,add.deposit.month,add.deposit.day,add.deposit.year);
  133.  
  134.  
  135. fclose(ptr);
  136. printf("\nAccount created successfully!");
  137. add_invalid:
  138. printf("\n\n\n\t\tEnter 1 to go to the main menu and 0 to exit:");
  139. scanf("%d",&main_exit);
  140. system("cls");
  141. if (main_exit==1)
  142. menu();
  143. else if(main_exit==0)
  144. close();
  145. else
  146. {
  147. printf("\nInvalid!\a");
  148. goto add_invalid;
  149. }
  150. }
  151. void view_list()
  152. {
  153. FILE *view;
  154. view=fopen("record.dat","r");
  155. int test=0;
  156. system("cls");
  157. printf("\nACC. NO.\tNAME\t\t\tADDRESS\t\t\tPHONE\n");
  158.  
  159. while(fscanf(view,"%d %s %d/%d/%d %d %s %s %lf %s %f %d/%d/%d",&add.acc_no,add.name,&add.dob.month,&add.dob.day,&add.dob.year,&add.age,add.address,add.citizenship,&add.phone,add.acc_type,&add.amt,&add.deposit.month,&add.deposit.day,&add.deposit.year)!=EOF)
  160. {
  161. printf("\n%6d\t %10s\t\t\t%10s\t\t%.0lf",add.acc_no,add.name,add.address,add.phone);
  162. test++;
  163. }
  164.  
  165. fclose(view);
  166. if (test==0)
  167. { system("cls");
  168. printf("\nNO RECORDS!!\n");}
  169.  
  170. view_list_invalid:
  171. printf("\n\nEnter 1 to go to the main menu and 0 to exit:");
  172. scanf("%d",&main_exit);
  173. system("cls");
  174. if (main_exit==1)
  175. menu();
  176. else if(main_exit==0)
  177. close();
  178. else
  179. {
  180. printf("\nInvalid!\a");
  181. goto view_list_invalid;
  182. }
  183. }
  184. void edit(void)
  185. {
  186. int choice,test=0;
  187. FILE *old,*newrec;
  188. old=fopen("record.dat","r");
  189. newrec=fopen("new.dat","w");
  190.  
  191. printf("\nEnter the account no. of the customer whose info you want to change:");
  192. scanf("%d",&upd.acc_no);
  193. while(fscanf(old,"%d %s %d/%d/%d %d %s %s %lf %s %f %d/%d/%d",&add.acc_no,add.name,&add.dob.month,&add.dob.day,&add.dob.year,&add.age,add.address,add.citizenship,&add.phone,add.acc_type,&add.amt,&add.deposit.month,&add.deposit.day,&add.deposit.year)!=EOF)
  194. {
  195. if (add.acc_no==upd.acc_no)
  196. { test=1;
  197. printf("\nWhich information do you want to change?\n1.Address\n2.Phone\n\nEnter your choice(1 for address and 2 for phone):");
  198. scanf("%d",&choice);
  199. system("cls");
  200. if(choice==1)
  201. {printf("Enter the new address:");
  202. scanf("%s",upd.address);
  203. fprintf(newrec,"%d %s %d/%d/%d %d %s %s %lf %s %f %d/%d/%d\n",add.acc_no,add.name,add.dob.month,add.dob.day,add.dob.year,add.age,upd.address,add.citizenship,add.phone,add.acc_type,add.amt,add.deposit.month,add.deposit.day,add.deposit.year);
  204. system("cls");
  205. printf("Changes saved!");
  206. }
  207. else if(choice==2)
  208. {
  209. printf("Enter the new phone number:");
  210. scanf("%lf",&upd.phone);
  211. fprintf(newrec,"%d %s %d/%d/%d %d %s %s %lf %s %f %d/%d/%d\n",add.acc_no,add.name,add.dob.month,add.dob.day,add.dob.year,add.age,add.address,add.citizenship,upd.phone,add.acc_type,add.amt,add.deposit.month,add.deposit.day,add.deposit.year);
  212. system("cls");
  213. printf("Changes saved!");
  214. }
  215.  
  216. }
  217. else
  218. fprintf(newrec,"%d %s %d/%d/%d %d %s %s %lf %s %f %d/%d/%d\n",add.acc_no,add.name,add.dob.month,add.dob.day,add.dob.year,add.age,add.address,add.citizenship,add.phone,add.acc_type,add.amt,add.deposit.month,add.deposit.day,add.deposit.year);
  219. }
  220. fclose(old);
  221. fclose(newrec);
  222. remove("record.dat");
  223. rename("new.dat","record.dat");
  224.  
  225. if(test!=1)
  226. { system("cls");
  227. printf("\nRecord not found!!\a\a\a");
  228. edit_invalid:
  229. printf("\nEnter 0 to try again,1 to return to main menu and 2 to exit:");
  230. scanf("%d",&main_exit);
  231. system("cls");
  232. if (main_exit==1)
  233.  
  234. menu();
  235. else if (main_exit==2)
  236. close();
  237. else if(main_exit==0)
  238. edit();
  239. else
  240. {printf("\nInvalid!\a");
  241. goto edit_invalid;}
  242. }
  243. else
  244. {printf("\n\n\nEnter 1 to go to the main menu and 0 to exit:");
  245. scanf("%d",&main_exit);
  246. system("cls");
  247. if (main_exit==1)
  248. menu();
  249. else
  250. close();
  251. }
  252. }
  253.  
  254. void transact(void)
  255. { int choice,test=0;
  256. FILE *old,*newrec;
  257. old=fopen("record.dat","r");
  258. newrec=fopen("new.dat","w");
  259.  
  260. printf("Enter the account no. of the customer:");
  261. scanf("%d",&transaction.acc_no);
  262. while (fscanf(old,"%d %s %d/%d/%d %d %s %s %lf %s %f %d/%d/%d",&add.acc_no,add.name,&add.dob.month,&add.dob.day,&add.dob.year,&add.age,add.address,add.citizenship,&add.phone,add.acc_type,&add.amt,&add.deposit.month,&add.deposit.day,&add.deposit.year)!=EOF)
  263. {
  264.  
  265. if(add.acc_no==transaction.acc_no)
  266. { test=1;
  267. if(strcmpi(add.acc_type,"fixed1")==0||strcmpi(add.acc_type,"fixed2")==0||strcmpi(add.acc_type,"fixed3")==0)
  268. {
  269. printf("\a\a\a\n\nYOU CANNOT DEPOSIT OR WITHDRAW CASH IN FIXED ACCOUNTS!!!!!");
  270. fordelay(1000000000);
  271. system("cls");
  272. menu();
  273.  
  274. }
  275. printf("\n\nDo you want to\n1.Deposit\n2.Withdraw?\n\nEnter your choice(1 for deposit and 2 for withdraw):");
  276. scanf("%d",&choice);
  277. if (choice==1)
  278. {
  279. printf("Enter the amount you want to deposit:$ ");
  280. scanf("%f",&transaction.amt);
  281. add.amt+=transaction.amt;
  282. fprintf(newrec,"%d %s %d/%d/%d %d %s %s %lf %s %f %d/%d/%d\n",add.acc_no,add.name,add.dob.month,add.dob.day,add.dob.year,add.age,add.address,add.citizenship,add.phone,add.acc_type,add.amt,add.deposit.month,add.deposit.day,add.deposit.year);
  283. printf("\n\nDeposited successfully!");
  284. }
  285. else
  286. {
  287. printf("Enter the amount you want to withdraw:$ ");
  288. scanf("%f",&transaction.amt);
  289. add.amt-=transaction.amt;
  290. fprintf(newrec,"%d %s %d/%d/%d %d %s %s %lf %s %f %d/%d/%d\n",add.acc_no,add.name,add.dob.month,add.dob.day,add.dob.year,add.age,add.address,add.citizenship,add.phone,add.acc_type,add.amt,add.deposit.month,add.deposit.day,add.deposit.year);
  291. printf("\n\nWithdrawn successfully!");
  292. }
  293.  
  294. }
  295. else
  296. {
  297. fprintf(newrec,"%d %s %d/%d/%d %d %s %s %lf %s %f %d/%d/%d\n",add.acc_no,add.name,add.dob.month,add.dob.day,add.dob.year,add.age,add.address,add.citizenship,add.phone,add.acc_type,add.amt,add.deposit.month,add.deposit.day,add.deposit.year);
  298. }
  299. }
  300. fclose(old);
  301. fclose(newrec);
  302. remove("record.dat");
  303. rename("new.dat","record.dat");
  304. if(test!=1)
  305. {
  306. printf("\n\nRecord not found!!");
  307. transact_invalid:
  308. printf("\n\n\nEnter 0 to try again,1 to return to main menu and 2 to exit:");
  309. scanf("%d",&main_exit);
  310. system("cls");
  311. if (main_exit==0)
  312. transact();
  313. else if (main_exit==1)
  314. menu();
  315. else if (main_exit==2)
  316. close();
  317. else
  318. {
  319. printf("\nInvalid!");
  320. goto transact_invalid;
  321. }
  322.  
  323. }
  324. else
  325. {
  326. printf("\nEnter 1 to go to the main menu and 0 to exit:");
  327. scanf("%d",&main_exit);
  328. system("cls");
  329. if (main_exit==1)
  330. menu();
  331. else
  332. close();
  333. }
  334.  
  335. }
  336. void erase(void)
  337. {
  338. FILE *old,*newrec;
  339. int test=0;
  340. old=fopen("record.dat","r");
  341. newrec=fopen("new.dat","w");
  342. printf("Enter the account no. of the customer you want to delete:");
  343. scanf("%d",&rem.acc_no);
  344. while (fscanf(old,"%d %s %d/%d/%d %d %s %s %lf %s %f %d/%d/%d",&add.acc_no,add.name,&add.dob.month,&add.dob.day,&add.dob.year,&add.age,add.address,add.citizenship,&add.phone,add.acc_type,&add.amt,&add.deposit.month,&add.deposit.day,&add.deposit.year)!=EOF)
  345. {
  346. if(add.acc_no!=rem.acc_no)
  347. fprintf(newrec,"%d %s %d/%d/%d %d %s %s %lf %s %f %d/%d/%d\n",add.acc_no,add.name,add.dob.month,add.dob.day,add.dob.year,add.age,add.address,add.citizenship,add.phone,add.acc_type,add.amt,add.deposit.month,add.deposit.day,add.deposit.year);
  348.  
  349. else
  350. {test++;
  351. printf("\nRecord deleted successfully!\n");
  352. }
  353. }
  354. fclose(old);
  355. fclose(newrec);
  356. remove("record.dat");
  357. rename("new.dat","record.dat");
  358. if(test==0)
  359. {
  360. printf("\nRecord not found!!\a\a\a");
  361. erase_invalid:
  362. printf("\nEnter 0 to try again,1 to return to main menu and 2 to exit:");
  363. scanf("%d",&main_exit);
  364.  
  365. if (main_exit==1)
  366. menu();
  367. else if (main_exit==2)
  368. close();
  369. else if(main_exit==0)
  370. erase();
  371. else
  372. {printf("\nInvalid!\a");
  373. goto erase_invalid;}
  374. }
  375. else
  376. {printf("\nEnter 1 to go to the main menu and 0 to exit:");
  377. scanf("%d",&main_exit);
  378. system("cls");
  379. if (main_exit==1)
  380. menu();
  381. else
  382. close();
  383. }
  384.  
  385. }
  386.  
  387. void see(void)
  388. {
  389. FILE *ptr;
  390. int test=0,rate;
  391. int choice;
  392. float time;
  393. float intrst;
  394. ptr=fopen("record.dat","r");
  395. printf("Do you want to check by\n1.Account no\n2.Name\nEnter your choice:");
  396. scanf("%d",&choice);
  397. if (choice==1)
  398. { printf("Enter the account number:");
  399. scanf("%d",&check.acc_no);
  400.  
  401. while (fscanf(ptr,"%d %s %d/%d/%d %d %s %s %lf %s %f %d/%d/%d",&add.acc_no,add.name,&add.dob.month,&add.dob.day,&add.dob.year,&add.age,add.address,add.citizenship,&add.phone,add.acc_type,&add.amt,&add.deposit.month,&add.deposit.day,&add.deposit.year)!=EOF)
  402. {
  403. if(add.acc_no==check.acc_no)
  404. { system("cls");
  405. test=1;
  406.  
  407. printf("\nAccount NO.:%d\nName:%s \nDOB:%d/%d/%d \nAge:%d \nAddress:%s \nCitizenship No:%s \nPhone number:%.0lf \nType Of Account:%s \nAmount deposited:$ %.2f \nDate Of Deposit:%d/%d/%d\n\n",add.acc_no,add.name,add.dob.month,add.dob.day,add.dob.year,add.age,add.address,add.citizenship,add.phone,
  408. add.acc_type,add.amt,add.deposit.month,add.deposit.day,add.deposit.year);
  409. if(strcmpi(add.acc_type,"fixed1")==0)
  410. {
  411. time=1.0;
  412. rate=9;
  413. intrst=interest(time,add.amt,rate);
  414. printf("\n\nYou will get $%.2f as interest on %d/%d/%d",intrst,add.deposit.month,add.deposit.day,add.deposit.year+1);
  415. }
  416. else if(strcmpi(add.acc_type,"fixed2")==0)
  417. {
  418. time=2.0;
  419. rate=11;
  420. intrst=interest(time,add.amt,rate);
  421. printf("\n\nYou will get $.%.2f as interest on %d/%d/%d",intrst,add.deposit.month,add.deposit.day,add.deposit.year+2);
  422.  
  423. }
  424. else if(strcmpi(add.acc_type,"fixed3")==0)
  425. {
  426. time=3.0;
  427. rate=13;
  428. intrst=interest(time,add.amt,rate);
  429. printf("\n\nYou will get $.%.2f as interest on %d/%d/%d",intrst,add.deposit.month,add.deposit.day,add.deposit.year+3);
  430.  
  431. }
  432. else if(strcmpi(add.acc_type,"saving")==0)
  433. {
  434. time=(1.0/12.0);
  435. rate=8;
  436. intrst=interest(time,add.amt,rate);
  437. printf("\n\nYou will get $.%.2f as interest on %d of every month",intrst,add.deposit.day);
  438.  
  439. }
  440. else if(strcmpi(add.acc_type,"current")==0)
  441. {
  442.  
  443. printf("\n\nYou will get no interest\a\a");
  444.  
  445. }
  446.  
  447. }
  448. }
  449. }
  450. else if (choice==2)
  451. { printf("Enter the name:");
  452. scanf("%s",&check.name);
  453. while (fscanf(ptr,"%d %s %d/%d/%d %d %s %s %lf %s %f %d/%d/%d",&add.acc_no,add.name,&add.dob.month,&add.dob.day,&add.dob.year,&add.age,add.address,add.citizenship,&add.phone,add.acc_type,&add.amt,&add.deposit.month,&add.deposit.day,&add.deposit.year)!=EOF)
  454. {
  455. if(strcmpi(add.name,check.name)==0)
  456. { system("cls");
  457. test=1;
  458. printf("\nAccount No.:%d\nName:%s \nDOB:%d/%d/%d \nAge:%d \nAddress:%s \nCitizenship No:%s \nPhone number:%.0lf \nType Of Account:%s \nAmount deposited:$%.2f \nDate Of Deposit:%d/%d/%d\n\n",add.acc_no,add.name,add.dob.month,add.dob.day,add.dob.year,add.age,add.address,add.citizenship,add.phone,
  459. add.acc_type,add.amt,add.deposit.month,add.deposit.day,add.deposit.year);
  460. if(strcmpi(add.acc_type,"fixed1")==0)
  461. {
  462. time=1.0;
  463. rate=9;
  464. intrst=interest(time,add.amt,rate);
  465. printf("\n\nYou will get $.%.2f as interest on %d/%d/%d",intrst,add.deposit.month,add.deposit.day,add.deposit.year+1);
  466. }
  467. else if(strcmpi(add.acc_type,"fixed2")==0)
  468. {
  469. time=2.0;
  470. rate=11;
  471. intrst=interest(time,add.amt,rate);
  472. printf("\n\nYou will get $.%.2f as interest on %d/%d/%d",intrst,add.deposit.month,add.deposit.day,add.deposit.year+2);
  473.  
  474. }
  475. else if(strcmpi(add.acc_type,"fixed3")==0)
  476. {
  477. time=3.0;
  478. rate=13;
  479. intrst=interest(time,add.amt,rate);
  480. printf("\n\nYou will get $.%.2f as interest on %d/%d/%d",intrst,add.deposit.month,add.deposit.day,add.deposit.year+3);
  481.  
  482. }
  483. else if(strcmpi(add.acc_type,"saving")==0)
  484. {
  485. time=(1.0/12.0);
  486. rate=8;
  487. intrst=interest(time,add.amt,rate);
  488. printf("\n\nYou will get $.%.2f as interest on %d of every month",intrst,add.deposit.day);
  489.  
  490. }
  491. else if(strcmpi(add.acc_type,"current")==0)
  492. {
  493.  
  494. printf("\n\nYou will get no interest\a\a");
  495.  
  496. }
  497.  
  498. }
  499. }
  500. }
  501.  
  502.  
  503. fclose(ptr);
  504. if(test!=1)
  505. { system("cls");
  506. printf("\nRecord not found!!\a\a\a");
  507. see_invalid:
  508. printf("\nEnter 0 to try again,1 to return to main menu and 2 to exit:");
  509. scanf("%d",&main_exit);
  510. system("cls");
  511. if (main_exit==1)
  512. menu();
  513. else if (main_exit==2)
  514. close();
  515. else if(main_exit==0)
  516. see();
  517. else
  518. {
  519. system("cls");
  520. printf("\nInvalid!\a");
  521. goto see_invalid;}
  522. }
  523. else
  524. {printf("\nEnter 1 to go to the main menu and 0 to exit:");
  525. scanf("%d",&main_exit);}
  526. if (main_exit==1)
  527. {
  528. system("cls");
  529. menu();
  530. }
  531.  
  532. else
  533. {
  534.  
  535. system("cls");
  536. close();
  537. }
  538.  
  539. }
  540.  
  541.  
  542. void close(void)
  543. {
  544. printf("\n\n\n\nThis C Mini Project is developed by Code With C team!");
  545. }
  546.  
  547.  
  548. void menu(void)
  549. { int choice;
  550. system("cls");
  551. system("color 9");
  552. printf("\n\n\t\t\tCUSTOMER ACCOUNT BANKING MANAGEMENT SYSTEM");
  553. printf("\n\n\n\t\t\t\xB2\xB2\xB2\xB2\xB2\xB2\xB2 WELCOME TO THE MAIN MENU \xB2\xB2\xB2\xB2\xB2\xB2\xB2");
  554. printf("\n\n\t\t1.Create new account\n\t\t2.Update information of existing account\n\t\t3.For transactions\n\t\t4.Check the details of existing account\n\t\t5.Removing existing account\n\t\t6.View customer's list\n\t\t7.Exit\n\n\n\n\n\t\t Enter your choice:");
  555. scanf("%d",&choice);
  556.  
  557. system("cls");
  558. switch(choice)
  559. {
  560. case 1:new_acc();
  561. break;
  562. case 2:edit();
  563. break;
  564. case 3:transact();
  565. break;
  566. case 4:see();
  567. break;
  568. case 5:erase();
  569. break;
  570. case 6:view_list();
  571. break;
  572. case 7:close();
  573. break;
  574.  
  575. }
  576.  
  577.  
  578.  
  579. }
  580. int main()
  581. {
  582. char pass[10],password[10]="fabliha";
  583. int i=0;
  584. printf("\n\n\t\tEnter the password to login:");
  585. scanf("%s",pass);
  586. /*do
  587. {
  588. //if (pass[i]!=13&&pass[i]!=8)
  589. {
  590. printf("*");
  591. pass[i]=getch();
  592. i++;
  593. }
  594. }while (pass[i]!=13);
  595. pass[10]='\0';*/
  596. if (strcmp(pass,password)==0)
  597. {printf("\n\nPassword Match!\nLOADING");
  598. for(i=0;i<=6;i++)
  599. {
  600. fordelay(100000000);
  601. printf(".");
  602. }
  603. system("cls");
  604. menu();
  605. }
  606. else
  607. { printf("\n\nWrong password!!\a\a\a");
  608. login_try:
  609. printf("\nEnter 1 to try again and 0 to exit:");
  610. scanf("%d",&main_exit);
  611. if (main_exit==1)
  612. {
  613.  
  614. system("cls");
  615. main();
  616. }
  617.  
  618. else if (main_exit==0)
  619. {
  620. system("cls");
  621. close();}
  622. else
  623. {printf("\nInvalid!");
  624. fordelay(1000000000);
  625. system("cls");
  626. goto login_try;}
  627.  
  628. }
  629. return 0;
  630. }
  631. dipto(1).c
  632. Open with
  633. Displaying dipto(1).c.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement