Jump to content

ProfessorZoom

Member
  • Posts

    4
  • Joined

  • Last visited

Awards

This user doesn't have any awards

Contact Methods

  • Discord
    admin#0001
  • Steam
    http://steamcommunity.com/id/thereverse
  • PlayStation Network
    Artix1416

Profile Information

  • Gender
    Male

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

ProfessorZoom's Achievements

  1. Here it is in c++, 25 lines that demands a correct octet before moving on like you said. #include <iostream> #include <string> int main() { int octet; std::string ipAddress = ""; for (unsigned int i = 0; i < 4; i++) { std::cout << "Please enter octet #" << i + 1 << ":\n"; do { std::cin >> octet; if (!(octet >= 0 && octet <= 255)) std::cout << "That octet is invalid. Please try again.\n"; } while (!(octet >= 0 && octet <= 255)); ipAddress += std::to_string(octet) + "."; } std::cout << "IP Address: " << ipAddress << "\b \n"; system("pause"); return 0; } /* Please enter octet #1: 1 Please enter octet #2: 2 Please enter octet #3: 3 Please enter octet #4: 4 IP Address: 1.2.3.4 Press any key to continue . . . */
  2. Here's some pseudocode to get you started: // include input/output stream // include time.h or ctime so you can seed rand() // main function // seed rand() // declare variables // multidimensional array, tuesday temperature, average noon temperature // // loop through the multidimensional array to assign all values // for each day 0-7 // for each hour 0-24 // assign random number from 50-80 // // find tuesday's average temperature // loop through each hour on tuesday // add each temperature and divide by 24 // // find the average weekly noon temperature // loop through each day in array // add every temperature from noon and divide by 7
  3. Try searching "computer part store" on Google Maps. There seems to be plenty in Idaho Falls and Blackfoot. https://www.google.com/maps/search/computer+part+store+near+idaho+falls/
  4. The last thing I bought, yesterday, was four comics.
  5. I believe I started with Java when I was trying to make Minecraft server plugins years and years ago.
  6. Here is a digital square root calculator in 26 lines. #include <iostream> #include <string> unsigned digitalRoot(std::ostream &ostr, unsigned input) { unsigned root = 0; while (input > 0) { unsigned digit = input % 10; root += digit; input /= 10; ostr << digit << " + "; } ostr << "\b\b\b = " << root << std::endl; return root < 10 ? root : digitalRoot(ostr, root); } int main() { std::string input; std::cout << "Please enter a number: "; std::getline(std::cin, input); std::cout << "\nDigital root is " << digitalRoot(std::cout, (unsigned long long)std::stoi(input)) << ".\n\n"; main(); return 0; }
×