Jump to content
Banner by ~ Ice Princess Silky

Ganaram Inukshuk

User
  • Posts

    471
  • Joined

  • Last visited

Everything posted by Ganaram Inukshuk

  1. #include <iostream> #include <iomanip> #include <string> using namespace std; int main() { // Declaration of Variables signed int day, month, year, arrayNumber1, arrayNumber2; string YourPonyName; string ponyname[30] = {"Twilight Sparkle", "Rainbow Dash", "Fluttershy", "Rarity", "Applejack", "Pinkie Pie", "Apple Bloom", "Scootaloo", "Sweetie Belle", "Babs Seed", "Diamond Tiara", "Silver Spoon", "Carrot Top", "Bonbon", "Lyra", "Derpy Hooves", "Berry Punch", "Cheerilee", "Nurse Redheart", "Mayor Mare", "Cloudchaser", "Flitter", "Thunderlane", "Caramel", "Snips", "Snails", "The Great and Powerful Trixie", "Featherweight", "Octavia", "Vinyl Scratch"}; string ponyactivity[19] = {"discover an ancient evil with", "bake a cake with", "sail across the world with", "go fishing with", "travel to Appaloosa with", "go stargazing with", "pick apples for", "get punched through the fourth wall by", "will have to use the bathroom of", "hug", "surprise hug", "get tickled by", "write a book with", "perform a show with", "give flowers to", "ride a train with", "ride a balloon with", "return a letter to", "play video games with"}; // Main stuff begins here cout << "Enter your pony name.\n"; cin >> YourPonyName; cout << "Input the day, month (the number), and year you were born.\n"; cin >> day >> month >> year; arrayNumber1 = day - 1; arrayNumber2 = day - month - 1; if (arrayNumber2 < 0) arrayNumber2 *= -1; cout << "You, " << YourPonyName << ", will " << ponyactivity[arrayNumber2] << " " << ponyname[arrayNumber1] << ".\n"; return 0; }Let me explain what all this gibberish means: First, I got some signed integer variables for the day and month and year. Then I have some string variables that I initialised as an array. You input your day and month (year's currently redundant but you still need to enter it), and some simple mathematical formulas will determine which strings will be used. For example, my birthday is July 9th. The variable arrayNumber1 will be assigned a value of 9 - 1, which is 8. This translates to ponyname[8], which corresponds to Sweetie Belle. Similarly, we have arrayNumber2, which is 9 - 7 - 1, which is 1. ponyactivity[1] corresponds to "bake a cake with". And all of that is outputted on a single line.
  2. There's a problem if you're born on, like, December 1st...
  3. #include <iostream> #include <iomanip> #include <string> using namespace std; int main() { // Declaration of Variables int day, month, year, arrayNumber1, arrayNumber2; string YourPonyName; string ponyname[30] = {"Twilight Sparkle", "Rainbow Dash", "Fluttershy", "Rarity", "Applejack", "Pinkie Pie", "Apple Bloom", "Scootaloo", "Sweetie Belle", "Babs Seed", "Diamond Tiara", "Silver Spoon", "Carrot Top", "Bonbon", "Lyra", "Derpy Hooves", "Berry Punch", "Cheerilee", "Nurse Redheart", "Mayor Mare", "Cloudchaser", "Flitter", "Thunderlane", "Caramel", "Snips", "Snails", "The Great and Powerful Trixie", "Featherweight", "Octavia", "Vinyl Scratch"}; string ponyactivity[19] = {"discover an ancient evil with", "bake a cake with", "sail across the world with", "go fishing with", "travel to Appaloosa with", "go stargazing with", "pick apples for", "get punched through the fourth wall by", "will have to use the bathroom of", "hug", "surprise hug", "get tickled by", "write a book with", "perform a show with", "give flowers to", "ride a train with", "ride a balloon with", "return a letter to", "play video games with"}; // Main stuff begins here cout << "Enter your pony name.\n"; cin >> YourPonyName; cout << "Input the day, month (the number), and year you were born.\n"; cin >> day >> month >> year; arrayNumber1 = day - 1; arrayNumber2 = day - month - 1; cout << "You, " << YourPonyName << ", will " << ponyactivity[arrayNumber2] << " " << ponyname[arrayNumber1] << ".\n"; return 0; }I think I got as much as I can...
  4. http://derpibooru.org/288004 Yeah, I think I need a better calculatory algorithm...
  5. #include <iostream> #include <iomanip> #include <string> using namespace std; int main() { // Declaration of Variables int day, month, year, arrayNumber1, arrayNumber2; string YourPonyName; string ponyname[31] = {"Twilight Sparkle", "Rainbow Dash", "Fluttershy", "Rarity", "Applejack", "Pinkie Pie", "Apple Bloom", "Scootaloo", "Sweetie Belle", "Babs Seed", "Diamond Tiara", "Silver Spoon", "Carrot Top", "Bonbon", "Lyra", "Derpy Hooves", "Berry Punch", "Cheerilee", "Nurse Redheart", "Mayor Mare", "Cloudchaser", "Flitter", "Thunderlane", "Caramel", "Snips", "Snails", "The Great and Powerful Trixie", "Featherweight", "Octavia", "Vinyl Scratch", "Princess Luna"}; string ponyactivity[31] = {"discover an ancient evil with", "bake a cake with", "sail across the world with", "go fishing with", "travel to Appaloosa with", "go stargazing with", "pick apples for", "get punched through the fourth wall by", "will have to use the bathroom of", "hug", "surprise hug", "get tickled by", "write a book with", "perform a show with", "give flowers to", "derail a train with", "ride a train with", "ride a balloon with", "return a letter to", "play video games with"}; // Main stuff begins here cout << "Enter your pony name.\n"; cin >> YourPonyName; cout << "Input the day, month (the number), and year you were born.\n"; cin >> day >> month >> year; arrayNumber1 = year % day; arrayNumber2 = (year * month) % month; cout << "You, " << YourPonyName << ", will " << ponyactivity[arrayNumber1] << " " << ponyname[arrayNumber2] << ".\n"; return 0; } This is how the program stands so far.
  6. Yeah, I'm gonna need 26 more activities... I'll think up a few, but I'll need a little more brainpower for this...
  7. @@Staticthor Draconus,@, I'm gonna need a total of 31 pony names and 31 pony activities. Screw all of those standard birthday games, I'm making mine far more complex. Hit me!!!
  8. Arrays: - Visual Basic - Kinda... - C++ - Currently teaching myself If-Then-Elst statements - Visual Basic - Yes. - C++ - Yes. Graphical stuff - Visual Basic - It's what I find to be difficult in VB, designing the form. - C++ - Wut?
  9. Yeah... I love programming so much, I'm programming things for outside my class... In fact, two other programs I was working on:
  10. Nope, still sick... And I wanted to make a program that would outdo every other birthday game there is...
  11. Banned because Gangnam is a district in Seoul, South Korea.
  12. Banned for back-and-forth banning for 3hree straight pages.
  13. Anypony have an algorithm that I could use? I'm thinking about using % and using the remainder, as opposed to using the actual day. But then, should I add or multiply?
  14. @@Electrobolt, Yes, I'm gonna bug you. HAI CAN HAS STDIO? PLZ OPEN FILE "LOLCATS.TXT"? AWSUM THX VISIBLE FILE O NOES INVISIBLE "ERRROR!" KTHXBYE Yes, that's an actual program.
  15. People have commented about Silver Spoon's grey mane. SS and I would then be in the same boat... I know nothing about Photoshosh...
  16. I know that feeling, but I don't think it ever relayed back into a dream. Dreams are weird... ----- I don't get the appeal of these kinds of things, but I think there should be a more complex algorithm other than just having your month of birth and day of birth... Like the hour, whether it's on a Monday or Tuesday, whether the year of birth is a prime number or something...
  17. http://derpibooru.org/271177 How is it that everypony else has Photoshosh and I don't? Really now? Care to elaborate?
  18. I remember having a dream kinda sorta similar to that. My limbs were blasted off from an explosion and I was dying out in the field. Lucky you can remember more than I could... Same position as I am: Sick.
  19. The most memorable dream I had like that was when I was 4. I was walking on my school's playground.
×
×
  • Create New...