Advertisement
Okiko

Pin Code Finder (Finds your pin code)

Jan 16th, 2016
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.46 KB | None | 0 0
  1. #include "stdafx.h"
  2. #include <iostream>
  3.  
  4. int main()
  5. {
  6.     using namespace std;
  7.     cout << "Printing all pin codes!\n";
  8.     for (int i = 0; i <= 9999; i++)
  9.     {
  10.         if (i < 10)
  11.         {
  12.             cout << "000";
  13.             cout << i;
  14.         }
  15.         else if (i < 100)
  16.         {
  17.             cout << "00";
  18.             cout << i;
  19.         }
  20.         else if (i < 1000)
  21.         {
  22.             cout << "0";
  23.             cout << i;
  24.         }
  25.         else
  26.             cout << i;
  27.  
  28.         if (i % 10 == 0)
  29.             cout << "\n";
  30.         else
  31.             cout << " ";
  32.     }
  33.     cout << "\nDone!\n";
  34.     return 0;
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement