fork download
  1. #include<stdio.h>
  2. #include<stdlib.h>
  3. #define PASSWD 1462
  4. #define TURE 1
  5. #define FALSE 0
  6. int main()
  7. {
  8. int passwd;
  9. int ok,xtry;
  10. ok=FALSE;
  11. xtry=0;
  12.  
  13. do{
  14. printf("%d. enter your psssword:\n",xtry++);
  15. scanf("%d",&passwd);
  16. if (passwd==PASSWD)
  17. ok=true;
  18. }
  19. while (!ok&&(xtry<=3));
  20. if ( ok )
  21. printf("\ncongratulations!\n");
  22.  
  23. else
  24. printf("\you are rejected!\n");
  25.  
  26. system("pause");
  27. return 0;
  28. }
  29.  
Success #stdin #stdout #stderr 0s 4512KB
stdin
Standard input is empty
stdout
0. enter your psssword:
1. enter your psssword:
2. enter your psssword:
3. enter your psssword:
you are rejected!
stderr
sh: 1: pause: not found