I know about using ran() to create a random number between x and y, however i am creating a banking program and i am wondering how to randomly generate a 17 digit pin, then store the pin in an outside file, then have the program check the file for the pin
Superfat 0 Newbie Poster
Recommended Answers
Jump to Post#include <cstdio> #include <cstdlib> #include <ctime> #include <iostream> using namespace std; int main ( int nNumberofArgs, char* pszArgs[] ) { srand ( ( unsigned ) time ( 0 ) ); const int a = rand() % 9 ; const int b = rand() % 9 ; const …
Jump to PostElaborate please =], i was trying to say that a-r are random numbers between 1 and 9, this is just a snipet of some code i already have, i an just having some problems with figuring out random numbers... i figured that if the largest variable is an unsigned, max …
All 8 Replies
vijayan121 1,152 Posting Virtuoso
Superfat 0 Newbie Poster
Jishnu 160 Posting Pro
mitrmkar 1,056 Posting Virtuoso
Superfat 0 Newbie Poster

iamthwee
Superfat 0 Newbie Poster
tesuji 135 Master Poster
iamthwee commented: Aw shucks, I'm not really God, it's just that's what the girls scream when they're with me. +14
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.