Programming

Discussion in 'Games' started by testyal1, Jul 29, 2011.

  1. testyal1

    testyal1 Princess of the Forum
    Banned

    Joined:
    Jun 11, 2011
    Messages:
    5,692
    Likes Received:
    1
    Occupation:
    Activist/Priest
    Location:
    Rata Sum
    One of the more interesting topics of computing is programming.

    for each person that has programmed something:
    print "post your stuff here"

    (I'm not one for writing long introductions, am I?)
     
  2. Yetione

    Yetione Local snowpony

    Cutie Mark:
    Joined:
    Jul 16, 2011
    Messages:
    10,986
    Likes Received:
    7
    Gender:
    Male
    Occupation:
    Software developer
    Location:
    Zagreb, Croatia, Europe
    well, here's little something I typed while no one wanted to chart with me
    Code:
    #include <iostream>
    #include <stdio.h>
    #include <string.h>
    #include <string>
    
    #include <cstdlib>
    using namespace std;
    class Pony {
        private:
        string pony;
        public:
        void setpony () {
        getline (cin, this->pony);
        }
        string getpony(){
        return (this->pony);
        }
    };
    
    int main () {
    Pony obj1;
    
    int a;
    
    cout<<"Enter pony name"<<endl;
    obj1.setpony ();
    cout<<endl;
    
    if (obj1.getpony()== "Fluttershy"){
       cout<<"um..is..that ok? *squeak*"<<endl;
    system ("pause");
        return 0;
    }else
    if (obj1.getpony()=="TwilightSparkle"){
        cout<<"science!"<<endl;
    system ("pause");
         return 0;
    }else
    if (obj1.getpony()== "Rarity") {
        cout<<"You're just fabulous darling"<<endl;
    system ("pause");
         return 0;
    }else
    if (obj1.getpony()=="RainbowDash"){
        cout<<"I'll be 20%cooler in 10 seconds flat"<<endl;
    system ("pause");
         return 0;
    }else
    if (obj1.getpony()== "Applejack"){
    
        cout<<"how do you like them apples?"<<endl;
    system ("pause");
         return 0;
    }else
    if (obj1.getpony()== "PinkiePie") {
        cout<<"Wanna make cupcakes?"<<endl;
    system ("pause");
        return 0;
    }else
    if ((obj1.getpony()== "Scootaloo") || (obj1.getpony()== "SweetyBell") || (obj1.getpony()== "AppleBloom")){
        cout<<"Hammer!"<<endl;
    system ("pause");
         return 0;
    }else
    if (obj1.getpony()== "DerpyHooves"){
    cout<<"Muffins!!!"<<endl;
    system ("pause");
     return 0;
    }
    else {
    cout<<"not a pony"<<endl;
    }
    system ("pause");
    return 0;
    }
    
    
    download application from here: (don't worry, I code it, it's safe):
    (use regular download after count down, not premium download)
    http://www.megaupload.com/?d=5WAYJ5ZC

    enter pony name and you'll get something. (don't use space and put Caps where needed (for example TwilightSparkle))

    also, when you press enter, you'll see something appear for very short time (I forgot to put in system pause ^.^') so print screen as soon as you pres enter, and then paste that print screen to pain to see massage (if you're using windows, if you're using linux, then no need for paint, for mac, idk)
    ^above issue fixed

    works on windows (made on windows), works on linux if you have wine (plug-in) installed, on mac apparently doesn't work (unless there's some application for running .exe applications.
     
    #2 Yetione, Jul 29, 2011
    Last edited: Jul 30, 2011
  3. Jaret

    Jaret Retired Staff
    Veteran

    Cutie Mark:
    Joined:
    Mar 21, 2011
    Messages:
    2,334
    Likes Received:
    0
    Occupation:
    Occasional DeFi Broker
    Location:
    Germaney
    Yeti, it immediately closes for me. I typed in "TwilightSparkle" and it went "puf".

    Edit: anything I type in instantly turns it off.
     
  4. Yetione

    Yetione Local snowpony

    Cutie Mark:
    Joined:
    Jul 16, 2011
    Messages:
    10,986
    Likes Received:
    7
    Gender:
    Male
    Occupation:
    Software developer
    Location:
    Zagreb, Croatia, Europe
    press print screen as soon as you press enter, and you'll caught it.
    print screen should look like these:

    click on image for full size.
    just make sure you get print screen button as soon as you press enter (like when you play video games and need to act quickly)


    wait few minutes, I'll add system pause into program so it'll be perfect.

    fixed, with new download link
     
    #4 Yetione, Jul 30, 2011
    Last edited: Jul 30, 2011
  5. DanSze

    DanSze Yard Sale Cowboy (on CD)
    Veteran

    Cutie Mark:
    Joined:
    Jul 6, 2011
    Messages:
    3,782
    Likes Received:
    29
    Occupation:
    Taking place
    Location:
    The place that is taken
    A somewhat better way to check what your input is (Pseudocode)

    in = readLine
    in = toLowerCase (in)
    if (in contains "twilight")&&(in contains "sparkle")
    print ("Science! Engergy!")
    if (in contains "applejack")
    print ("SNAPPLES!")
    ... //all other ifs go here

    This way you don't care how they typed it, as long as it;s spelled right.
     
  6. Vinyl Scratch

    Vinyl Scratch Former Staff

    Cutie Mark:
    Joined:
    May 6, 2011
    Messages:
    457
    Likes Received:
    0
    Location:
    Whinnypeg, Manetoba


    So, it gets the media information about all the authors? Don't we have a Google Document which lists all songs by every author with Ctrl+F forcibly being on EVERY KEYBOARD IMAGINABLE?
     
  7. Tenortrouble

    Tenortrouble Princess of the Forum

    Cutie Mark:
    Joined:
    Jun 23, 2011
    Messages:
    5,043
    Likes Received:
    0
    Occupation:
    I am a full time, year round student and I work at
    I can only do shapefile (.shp) and that is only if they are already written. What can you do with programming Testyal?
     
  8. Ripp_

    Ripp_ A Pony Every Pony Should Know
    Banned

    Joined:
    Jul 16, 2011
    Messages:
    1,013
    Likes Received:
    0
    @Vinyl
    1) Programmers gotta program
    2) Google docs is slow for me
    3) Yes I know that where all the info comes from
    4) /copy
    5) /random
    6) c 1.
     

Share This Page