Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #pragma once
- ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- // Function Definitons
- void intro(int x) {
- string pad;
- string intro = "This Is A Parts Database";
- int cent = (80 - intro.length()) / 2;
- for (int i = 0; i < cent; i++)
- pad += ' ';
- cout << setw(x) << setfill('*') << '*' << endl;
- cout << setfill(' ') << right << pad << intro << endl;
- cout << setw(x) << setfill('*') << '*' << endl;
- }
- void pad() {
- cout << setw(80) << setfill('*') << '*' << endl;
- }
- int chooseshape() {
- int counter = 0;
- int choice;
- cout << "You have chosen to play with shapes\n\nWould you rather play with a triangle or a rectangle\n1) triangle\n\n2) rectangle" << endl;
- cout << setw(80) << setfill('*') << '*' << endl;
- cout << "your choice: ";
- while (true) {
- cin >> choice;
- cout << setw(80) << setfill('*') << '*' << endl;
- counter += 1;
- if (choice == 1 || choice == 2)
- break;
- else if (counter > 2) {
- choice = 3;
- break;
- }
- else
- cout << "select using either numeral \"1\" or \"2\"\nyour choice: " << endl;
- }
- return choice;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement