Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "stdafx.h"
- #include <iostream>
- int main()
- {
- using namespace std;
- cout << "Printing all pin codes!\n";
- for (int i = 0; i <= 9999; i++)
- {
- if (i < 10)
- {
- cout << "000";
- cout << i;
- }
- else if (i < 100)
- {
- cout << "00";
- cout << i;
- }
- else if (i < 1000)
- {
- cout << "0";
- cout << i;
- }
- else
- cout << i;
- if (i % 10 == 0)
- cout << "\n";
- else
- cout << " ";
- }
- cout << "\nDone!\n";
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement