rajeevs1992

Password code

Mar 25th, 2011
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.37 KB | None | 0 0
  1. void password()
  2.  
  3. {
  4.  
  5. ifstream i;
  6.  
  7. float pd;
  8.  
  9. i.open("K:\\pd"); //my pendrive
  10.  
  11. i.read((char*)&pd,sizeof pd);
  12.  
  13.    i.close();
  14.  
  15. int flag;
  16.  
  17. flag=pd/66;    //the decryption of password
  18.  
  19. flag=flag+523;
  20.  
  21.    if(flag%12==0)
  22.  
  23. {
  24.  
  25. cout<<"\nWelcome";
  26.  
  27. getch();
  28.  
  29. }
  30.  
  31. else
  32.  
  33. {
  34.  
  35. while(1)  //prank-an infinite loop
  36.  
  37. {
  38.  
  39. cout<<"Operation Fail";
  40.  
  41. }
  42.  
  43. }
  44.  
  45.  
  46. }
Advertisement
Add Comment
Please, Sign In to add comment