Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstdio>
- #include <cmath>
- #include <cstdlib>
- using namespace std;
- double Atemp = 0;
- double Utemp = 0;
- double Working = 0;
- double Total = 0;
- char Answer = 'x';
- int Umain;
- void displayOverview ();
- void playOrQuit();
- void promptNumber();
- void fillUserArray(char grid[]);
- int main(){
- displayOverview();
- playOrQuit();
- promptNumber();
- return 0;
- }
- void displayOverview(){
- }
- void playOrQuit(){
- string playOrNot;
- cout << "If you want to play please press 'p' for play, and 'q' if you wish to quitn";
- cin >> playOrNot;
- if(playOrNot == "p"){
- cout << "Awesome, lets start playing !!! n";
- }if(playOrNot == "q"){
- cout << "Alright then, see you soon !!n";
- exit(0);
- }if(playOrNot != "p" && playOrNot != "q"){
- cout << "Invalid entry !!n";
- exit(0);
- }
- }
- void promptNumber(){
- do{
- cout << "Please Enter numbers between 1 and 12: ";
- cin >> Umain;
- if(Umain <= 12){
- for (Utemp = Umain; Utemp > 0; Utemp--){
- cout << "Please enter a number: ";
- cin >> Atemp;
- }
- }else{
- cout << "Not within limit :(n";
- }
- }while (Answer == 'y');
- }
- void fillUserGrid (char grid[]){
- for( int row = 0; row < Umain; row++ ) {
- for(int col = 0; col < Umain; col++){
- grid[row][col] = userInput.at( row * Umain + col );
- }
- }
- }
- void outputUserGrid(char grid[]){
- for (int row = 0; row < Umain; row++){
- for(int col = 0; col < Umain; col++){
- cout << grid[row][col]<<" ";
- }
- cout << endl;
- }
- }
Add Comment
Please, Sign In to add comment