#include <iostream>
//should need <ctime>
//should need <cstdlib>
//should need <string>
int main()
{
std::string inPutNum; //Users inputed number.
int outPutNum; //Users outputed number.
constint MAX_RAND_VALUE = 100; //Maximum randum number limit.
srand(time(NULL)); //unique seed.
std::cout << "I will give you a unique number based off of your"
<< " input of a integer (whole number).\n";
std::cout << "Number: "; //"Asks" for a intager.
getline(std::cin,inPutNum); // Grabs the number.
outPutNum = stoi(inPutNum); //sets are int to the users input.
if(outPutNum < 1 || outPutNum > 9999) //Keeps a resonable number.
{
outPutNum = 1;
}
std::cout << outPutNum << " is the number we were able to use.\n" ;
std::cout << "\n\nRandom Ultra Number (R.U.N): " << (outPutNum * outPutNum)
* (((rand() % MAX_RAND_VALUE) + 1) + outPutNum); //*facepalm*
//notice no return statment!
}
A particular implementation may #include other headers from a header, so when you #include <iostream>, you might also end up #including <ctime> indirectly. However, your code might not compile in other implementations.