/* * This script generates a simple, but nice (sorta) Bingo Card! * * Author: Angel Rojas * Created on: Aug 20, 2015 * Source file: BingoCard.cpp */ #include #include #include using namespace std; int main() { cout << " B I N G O "; cout << endl; /* * @srand: the 'srand' command makes it so we have a different * value each time */ srand((unsigned) time(0)); int random_integer; int row, column; for (row = 0; row < 5; row++) { for (column = 0; column < 5; column++) { random_integer = (rand() % 99) + 1; cout << "[" << random_integer << ']'; cout << ' '; if (row == 2 && column == 1) { cout << "FREE "; } if (row == 2 && column == 3) {break;} } cout << endl; } }