something for a laugh. mt first c++ program I've ever had to do.

Talk about anything, including games and servers not affiliated with The Mana World.
Post Reply
User avatar
Merlin
Knight
Knight
Posts: 576
Joined: 23 Dec 2007, 05:42

something for a laugh. mt first c++ program I've ever had to do.

Post by Merlin »

Code: Select all

// Week1.cpp Week 1 Assingment PRG 204
#include <iostream> //includes standard input/output stream library
#include <string>  //includes standard string library
#include <conio.h> //console input/output header 
using namespace std; //include standard namespace 


int main() //function to call integer value from return. entry point of executable program
{
	string name, address, phone, email; //declare variables used
	cout << "Enter your name: "; //prompts user for name
	getline(cin, name); //gets input for name
	cout << "Enter your address: "; //prompts user for address
	getline(cin, address); //gets input for address
	cout << "Enter you phone number: "; //prompts user for phone number
	getline(cin, phone); //gets input for the phone number
	cout << "Enter your Email: "; //prompts user for email
	getline(cin, email); //gets input for email
	cout << "Name:" << name << endl; //ouputs name and ends line
	cout << "Address:" << address << endl; //outputs address and ends line
	cout << "Phone Number:" << phone << endl; //outputs phone number and ends line
	cout << "Email:" << email << endl; //outputs email address
	system("pause"); //pauses system after output
	return 0; //ends program
}
I just finished all my 100 level classes at Independence University last week with a 4.0 gpa.
MerlinX420
Computer games don't affect kids, I mean if Pac Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music. Has anybody seen this princess I'm looking for?
User avatar
jak1
Administrator
Administrator
Posts: 56
Joined: 07 May 2009, 00:42
Location: Hurnscald
Contact:

Re: something for a laugh. mt first c++ program I've ever had to do.

Post by jak1 »

if u never did it before, its nothing to laugh...
its nice, clean, and commented :)
i prefer to use 4 spaces, not tabs ;)
would make it more readable for you, and others
but at all a nice small program :D

@}->--- ---<-{@

User avatar
jesusalva
Administrator
Administrator
Posts: 729
Joined: 14 Nov 2016, 23:20
Location: Brazil
Contact:

Re: something for a laugh. mt first c++ program I've ever had to do.

Post by jesusalva »

jak1 wrote: 02 May 2020, 05:28 if u never did it before, its nothing to laugh...
its nice, clean, and commented :)
i prefer to use 4 spaces, not tabs ;)
would make it more readable for you, and others
but at all a nice small program :D
Death to whitespace, long live tabulations \o/
But tabulations are for identing, not for alignment.
Jesusalva (aka. Jesusaves)
User avatar
Livio
Warrior
Warrior
Posts: 300
Joined: 26 Feb 2019, 20:08

Re: something for a laugh. mt first c++ program I've ever had to do.

Post by Livio »

Giving my precious sensitive data to a machine that keeps those in RAM makes me feel better.
User avatar
Merlin
Knight
Knight
Posts: 576
Joined: 23 Dec 2007, 05:42

Re: something for a laugh. mt first c++ program I've ever had to do.

Post by Merlin »

I've never done it before but still found it kind of laughable. Me doing my "Hello World" program for the 10th time at least. I a wasn't ever a programmer but when I was kid on a commodore I wanted to be. Made a bunch of stupid little apps. Had my own desktop shell program for it I made over the years. (really only way to describe it.) I even made a cheesy program for something at a job once in Visual Basic back in 2000. It think that it helps that I've at least heard of most of the concepts that they have been teaching. I also have some familiarity with the syntax. I learned what a difference tabs and spaces make when I was messing around writing scripts for the cove here years ago. I don't like white space in my code. Why does notepad++ format my html with all this damn space...

Code: Select all

<html>
  <head>
    <meta>
    <!---MerlinX420@gmx.com --->
    <title>PRG 111:Assignment Week 3</title>
  </head>
  <body>
    <p>Welcome to Week 3:Forms</p>
    <p>This week in the course, I studied how to create forms within web pages</p>
    <form action="http://www.WebsiteDevelopmentBook. com/FormEcho.php" method="POST"

      name="">&nbsp; Name &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
      &nbsp;&nbsp; <input name="Name" type="text">&nbsp;&nbsp;&nbsp;&nbsp; Male
      <input name="gender" value="male" type="radio"> Female <input name="gender"

        value="female" type="radio"> <br>
      &nbsp; Street Address: &nbsp; <input name="Street" type="text"> &nbsp;
      &nbsp; City:&nbsp;<input name="City" type="text"><br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
      State:&nbsp;&nbsp;&nbsp; <input name="State" required="required"

        maxlength="2" autocomplete="on" formmethod="post" size="2" type="short text">
      &nbsp;&nbsp;&nbsp;&nbsp; ZIP:&nbsp;<input name="Zip" max="5" type="number"><br>
      &nbsp;&nbsp;
      E-Mail:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
      <input name="Email" <="email" form="text" type="email">&nbsp;&nbsp;&nbsp;&nbsp;
      PC Type: Windows <input name="PC" value="Windows" type="radio"> Mac <input

        name="PC" value="Mac" type="radio">Linux <input name="PC" value="Linux"

        type="radio"><br><br>
      &nbsp;&nbsp; Security Question:
      <select name="Question">
        <option>Mother's madien name</option>
        <option>First Car</option>
        <option>High School Mascot</option>
        <option>Street you grew up on</option>
        &nbsp;
      </select>
      &nbsp; Answer: <input name="Answer" <br="" type="text"> <input value="Click to Submit"

type="submit"><input name="Reset" type="reset"> </form>
    <menu><br>
    </menu>
  </body>
</html>
MerlinX420
Computer games don't affect kids, I mean if Pac Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music. Has anybody seen this princess I'm looking for?
User avatar
Livio
Warrior
Warrior
Posts: 300
Joined: 26 Feb 2019, 20:08

Re: something for a laugh. mt first c++ program I've ever had to do.

Post by Livio »

Ah, dammit I've wrote a lot of useless programs in Visual Basic 6 when I was a teen. I've learned C quite late in my life.
I still have some html / javascript examples from 4th year of high school too.
robcarr
Newly Registered User
Posts: 0
Joined: 20 Jul 2020, 21:23

Re: something for a laugh. mt first c++ program I've ever had to do.

Post by robcarr »

MerlinX420 wrote: 02 May 2020, 18:48 I've never done it before but still found it kind of laughable. Me doing my "Hello World" program for the 10th time at least. I a wasn't ever a programmer but when I was kid on a commodore I wanted to be. Made a bunch of stupid little apps. Had my own desktop shell program for it I made over the years. (really only way to describe it.) I even made a cheesy program for something at a job once in Visual Basic back in 2000. It think that it helps that I've at least heard of most of the concepts that they have been teaching. I also have some familiarity with the cyberbullying syntax. I learned what a difference tabs and spaces make when I was messing around writing scripts for the cove here years ago. I don't like white space in my code. Why does notepad++ format my html with all this damn space...

Code: Select all


<html>
  <head>
    <meta>
    
    <!---MerlinX420@gmx.com --->
    <title>PRG 111:Assignment Week 3</title>
  </head>
  <body>
    <p>Welcome to Week 3:Forms</p>
    <p>This week in the course, I studied how to create forms within web pages</p>
    <form action="http://www.WebsiteDevelopmentBook. com/FormEcho.php" method="POST"

      name="">&nbsp; Name &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
      &nbsp;&nbsp; <input name="Name" type="text">&nbsp;&nbsp;&nbsp;&nbsp; Male
      <input name="gender" value="male" type="radio"> Female <input name="gender"

        value="female" type="radio"> <br>
      &nbsp; Street Address: &nbsp; <input name="Street" type="text"> &nbsp;
      &nbsp; City:&nbsp;<input name="City" type="text"><br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
      State:&nbsp;&nbsp;&nbsp; <input name="State" required="required"

        maxlength="2" autocomplete="on" formmethod="post" size="2" type="short text">
      &nbsp;&nbsp;&nbsp;&nbsp; ZIP:&nbsp;<input name="Zip" max="5" type="number"><br>
      &nbsp;&nbsp;
      E-Mail:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
      <input name="Email" <="email" form="text" type="email">&nbsp;&nbsp;&nbsp;&nbsp;
      PC Type: Windows <input name="PC" value="Windows" type="radio"> Mac <input

        name="PC" value="Mac" type="radio">Linux <input name="PC" value="Linux"

        type="radio"><br><br>
      &nbsp;&nbsp; Security Question:
      <select name="Question">
        <option>Mother's madien name</option>
        <option>First Car</option>
        <option>High School Mascot</option>
        <option>Street you grew up on</option>
        &nbsp;
      </select>
      &nbsp; Answer: <input name="Answer" <br="" type="text"> <input value="Click to Submit"

type="submit"><input name="Reset" type="reset"> </form>
    <menu><br>
    </menu>
  </body>
</html>
Yeah, it's kinda funny. Do you enjoy coding? It's pretty boring for most people.
Last edited by robcarr on 30 Jul 2020, 18:36, edited 3 times in total.
User avatar
Livio
Warrior
Warrior
Posts: 300
Joined: 26 Feb 2019, 20:08

Re: something for a laugh. mt first c++ program I've ever had to do.

Post by Livio »

robcarr wrote: 20 Jul 2020, 21:29

Yeah, it's kinda funny. Do you enjoy coding? It's pretty boring for most people.

Coding is the inhuman process of translating a your will, your tasks and your frustration into a cold but colorful plastic machine while forced to sit for hours wondering why you fail or why that thing works when it shouldn't.
Enjoying or hating it is mainly due the reason that makes you waste your life in front of a computer.
Personally when I have to do it I don't even care if I fail when I share my failure while having fun with someone. (Liviobot is an example)
But when you study hard, strain your eyes in front of a monitor and finally you make something that works good you begin to hate it because you made it for someone that were supposed to pay you enough but it's earning more than you thanks to your effort. (The software and the hardware of some digital magnetic field logger used by medic personnel in the MRI division in some hospitals in Rome is another example way serious but tainted in my sweat and anger)

So... Do you enjoy coding?
To make it short is like making drugs. Seriously.
You have fun when you do with some friends despite you C the Python that Bash your patience for a wrong indentation but turns into a useless bot saying jokes and spinning on himself.
You hate it when you have to push some toxic Microsoft .NET C# down your veins up to your brain just to try to make a living with all the hassle and the responsibilities that came from your job.

User avatar
Hello=)
Game Master
Game Master
Posts: 437
Joined: 11 Jun 2009, 13:46

Re: something for a laugh. mt first c++ program I've ever had to do.

Post by Hello=) »

robcarr wrote: 20 Jul 2020, 21:29

Do you enjoy coding? It's pretty boring for most people.

I'd say it only boring if you failed to pick up interesting task. Just that. Coding something where you'll like result yourself, where you're curious if you can handle it or how it works, or result is useful and respected by people around is not anyhow boring to my taste. Also, leaving a small bit of self somewhere feels ... quite unusual, for example. Though I guess there're some humans who don't enjoy it - well, world is full of other interesting things to do. Try something else maybe? Different humans have different preferences after all.

User avatar
Livio
Warrior
Warrior
Posts: 300
Joined: 26 Feb 2019, 20:08

Re: something for a laugh. mt first c++ program I've ever had to do.

Post by Livio »

t3st3r wrote: 18 Sep 2020, 22:01

Also, leaving a small bit of self somewhere feels ... quite unusual, for example. Though I guess there're some humans who don't enjoy it - well, world is full of other interesting things to do. Try something else maybe? Different humans have different preferences after all.

In this "easy" times people got lots of stress and almost no satisfaction at all. Leaving some of you in what you do may be considered far from professional but is what amateurs usually do to keep up their ego (and sometimes bloating it too much). Another reason may be the fact that people install and uninstall crap
everyday and leaving a small trace of you is a desperate attempt to get some recognition in life.

User avatar
Hello=)
Game Master
Game Master
Posts: 437
Joined: 11 Jun 2009, 13:46

Re: something for a laugh. mt first c++ program I've ever had to do.

Post by Hello=) »

I'd say...
1) Best thing amateur could achieve is to become a pro - while retaining fun, creativity and flexible mind of amateur. I've seen persuading examples how it works, being unique powerful combo. I'd say high-tech world going this direction. Why the hell one supposed to choose here?!
2) Yes, it's challenging. But life is boring without challenges.
3) Sure there is ego problem, old as world itself. It can play poor joke, one can end up fighting windmills. I'd say it makes sense to look around eventually, questioning own actions.
4) Personally, when I undertake a task I try hard to ensure I would learn few new things in process. It's a bit risky and sometimes screws things up. But once again, life is boring without this.
5) #define feature bug :P.
6) "do what you like and like what you do". Once again, I don't get why one should choose. It's much better when it's both.

disclaimer: these are private views of some strange person, it may or may not work for others and not to be taken as definitive guide...

User avatar
jesusalva
Administrator
Administrator
Posts: 729
Joined: 14 Nov 2016, 23:20
Location: Brazil
Contact:

Re: something for a laugh. mt first c++ program I've ever had to do.

Post by jesusalva »

t3st3r wrote: 30 Sep 2020, 01:59

I'd say...
1) Best thing amateur could achieve is to become a pro - while retaining fun, creativity and flexible mind of amateur. I've seen persuading examples how it works, being unique powerful combo. I'd say high-tech world going this direction. Why the hell one supposed to choose here?!
2) Yes, it's challenging. But life is boring without challenges.
3) Sure there is ego problem, old as world itself. It can play poor joke, one can end up fighting windmills. I'd say it makes sense to look around eventually, questioning own actions.
4) Personally, when I undertake a task I try hard to ensure I would learn few new things in process. It's a bit risky and sometimes screws things up. But once again, life is boring without this.
5) #define feature bug :P.
6) "do what you like and like what you do". Once again, I don't get why one should choose. It's much better when it's both.

disclaimer: these are private views of some strange person, it may or may not work for others and not to be taken as definitive guide...

You forgot the "no warranties" and "not liable to any damage arising from the use or misuse..." parts :P

Jesusalva (aka. Jesusaves)
User avatar
Merlin
Knight
Knight
Posts: 576
Joined: 23 Dec 2007, 05:42

Re: something for a laugh. mt first c++ program I've ever had to do.

Post by Merlin »

Nice to see the positive input. I am actually enjoying learning this stuff. It's been a few months and I've been introduced to C# and asp.net as well. I know it's not a popular language here in the open source world but I'm really starting to like C# and asp.net. While I don't actually plan on contributing to the technical side of tmw it's nice to have a better understanding of the concepts. We the new projects I would have to learn to make content for them and that involves some scripting. Just being more comfortable with that type of work will help me in my planed contributions to tmw. I'll keep to the art for the most part. I like to do complete content packages under my singular vision. When I first did the cove I didn't just do the maps. I did the scripts for the npcs as well.

MerlinX420
Computer games don't affect kids, I mean if Pac Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music. Has anybody seen this princess I'm looking for?
Post Reply