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
MerlinX420
Warrior
Warrior
Posts: 576
Joined: 23 Dec 2007, 05:42

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

Post by MerlinX420 »

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
Developer
Developer
Posts: 33
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: 389
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
Novice
Novice
Posts: 211
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
MerlinX420
Warrior
Warrior
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 MerlinX420 »

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
Novice
Novice
Posts: 211
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
Novice
Novice
Posts: 211
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.

Post Reply