Last active
August 29, 2015 14:28
-
-
Save asterwolf/b984353e2268aaa8075a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Tester program | |
* @author: Diego Diaz | |
* Created on: Aug 23, 2015 | |
* Source File: | |
*/ | |
#include <iostream> | |
#include <sstream> | |
#include <string> | |
using namespace std; | |
int main(int argc, char *argv[]) { | |
//int numb[30]; | |
string bingo = "BINGO"; | |
string letter; | |
int loc = 0; | |
int numb; | |
srand (time(NULL)); | |
for(int row = 0; row < 6; row++){ | |
for(int col = 0; col < 5; col++){ | |
while(row == 0 && loc < 5){ | |
letter = bingo.substr(loc,1); | |
cout << "[" << letter << " " << "]"; | |
loc++; | |
} | |
numb = rand() % 100; | |
if(row != 0){ | |
if(numb < 10){ | |
cout << "[" << "0" << numb << "]"; | |
} | |
else if( row == 3 && col == 2){ | |
cout << "[" << "**" << "]"; | |
} | |
else{ | |
cout << "[" << numb << "]"; | |
} | |
} | |
} | |
cout<< endl; | |
} | |
} |
Author
asterwolf
commented
Aug 24, 2015
I will put in the free spot tomorrow! For now here's what it looks like.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment