Professional Documents
Culture Documents
Homework Assignment #3 DUE: Friday, May 7, 2010 Programming and Algorithms Spring Semester, 2010 Total Marks: 10
Homework Assignment #3 DUE: Friday, May 7, 2010 Programming and Algorithms Spring Semester, 2010 Total Marks: 10
3. ?.
Hint: 8lease ,o and read the detailed description of =uhn Al,orithm from the followin, link" http://www.moneybluebook.com/how-to-create-and-generate- alid-credit-card-numbers/ 5etails of rand() function can e found out from the followin, link"
http://www.cplusplus.com/re!erence/clibrary/cstdlib/rand/
4. Sample run -hat do you want to do@ !. Aenerate a credit card num er. (. 0erify a credit card num er. 3. 3xit. 3nter your choice (press !% ( or 3)" ! -hich type of Credit Card num er do you want to ,enerate@ !. American 3xpress (. &aster Card 3. 0isa ?. 5isco.ery #. Ao ack to main menu 3nter your choice (press !% (% 3% ? or #)" 3 Aenerated 0isa card num er is ?(!'//!3'#'B)$/( -hich type of Credit Card num er do you want to ,enerate@ !. American 3xpress (. &aster Card 3. 0isa ?. 5isco.ery #. Ao ack to main menu 3nter your choice (press !% (% 3% ? or #)" # -hat do you want to do@ !. Aenerate a credit card num er. (. 0erify a credit card num er. 3. 3xit. 3nter your choice (press !% ( or 3)" 3 (8ro,ram should exit now) *he num er used a o.e is an expired Credit Card num er and can only e used for testin, and .alidation only. -ron, entries of this or any credit card num er at any we site; usiness are recorded alon, with 18 address and identity of the user y cy er crime a,encies. 2uch an act is punisha le y law in 8akistan and a road.