Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //don't question it, it's for a school project. main() is in another class, and all it does is call ReadTargetData()
- #include "stdafx.h"
- #include <iostream>
- #include <string>
- using namespace std;
- void ReadTargetData()
- {
- void ReadTargetData();
- void ReadDifficulty();
- void SetPriority(int value);
- void PrintTarget(string name, string hitID, int value, string priority);
- string name;
- string hitID;
- int value;
- string priority;
- cout << "_________________________________________________" << endl;
- cout << "| Enter Hit Data |" << endl;
- cout << "|###############################################|" << endl;
- cout << "| Enter the target's first name |" << endl;
- cin >> name;
- cout << "| Enter the hit ID |" << endl;
- cin >> hitID;
- cout << "| Enter a difficulty for the hit |" << endl;
- cout << "| [Easy][Medium][Hard] |" << endl;
- ReadDifficulty();
- cout << "| Enter a value for the hit (dollars) |" << endl;
- cin >> value;
- priority = SetPriority(value);
- cout << "|###############################################|" << endl;
- cout << "| Data entry complete |" << endl;
- cout << "|_______________________________________________|" << endl;
- }
- void ReadDifficulty()
- {
- string difficulty;
- while (true)
- {
- cin >> difficulty;
- if (difficulty == "easy" || difficulty == "Easy" || difficulty == "medium" || difficulty == "Medium" || difficulty == "hard" || difficulty == "Hard")
- {
- break;
- }
- else
- {
- cout << "| Invalid difficulty, please try again |" << endl;
- }
- }
- }
- string SetPriority(int value)
- {
- string priority;
- if (value < 1000)
- {
- priority = "Low priority";
- }
- else if (value > 1000000)
- {
- priority = "Low priority";
- }
- else if (value < 1000000 && value > 1000)
- {
- priority = "Medium priority";
- }
- return priority;
- }
- void PrintTarget(string name, string hitID, int value, string priority)
- {
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement