Forums

Forums (http://www.abandonia.com/vbullet/index.php)
-   Programming (http://www.abandonia.com/vbullet/forumdisplay.php?f=25)
-   -   My First Program In C++ ^_^ (http://www.abandonia.com/vbullet/showthread.php?t=3284)

Ioncannon 19-02-2005 10:32 PM

Yay I made my first program (besides hello world or exercieses) in c++. Its a multiplication program. Enter two numbers and it tells you the answer. Nothing special but I am proud of it (since it is my first program) :). Here is a link if you want to try the program:

angelfire.com/ak5/opc/multi.zip
(copy and paste)

I will add onto it as I know my knowledge grows.

Havell 19-02-2005 10:35 PM

Very interesting! :ok: Any chance of you releasing the source code? It would be quite interesting to see how much code a program like that needs.

Braindead 19-02-2005 11:15 PM

cool, how much does it cost to register this program :tease:


Ioncannon 20-02-2005 12:05 AM

50 cents

dragonLancer 20-02-2005 01:03 AM

my newest program is a extreamly short text game where you input name # and smaller # to get a short storie! nothing much but hey like he said i pround of myself LOL btw are you using a book, I am its called "beginning C++ game Programming" :guns:



------------DragonLancer

Ioncannon 20-02-2005 01:58 AM

cool. I am using Jesse Liberty's: Teach yourself C++ in 21 days. Also my dad helps me a bit (he is a professional). BTW this is the code is used:
Code:

#include <iostream>
#include <conio.h>
using namespace std;

int multiply (int a, int b)
{       
        return (a * b);
}
int main()
{
        int a = 0;
        int b = 0;
        int c = 0;


 *cout << "===================================================\n";
        cout << "|^_^Welcome to Filip's Multiplication Program!!^_^|\n";
        cout << "===================================================\n";
        cout << "\nPlease enter a number to be multiplied\n";
        cout << "Number to be multiplied is ==> ";
        cin >> a;
        cout << "\nPlease enter a number to multiply it by\n";
        cout << "Number to multiply by is ==> ";
        cin >> b;
        c = multiply(a, b);
        cout << "\nThe answer is ==> " << c << "\n\n";
        cout << "Press any key to exit the program.\n";
        _getch();
        return 0;
}

spacing is screwed up do to copy/paste

Ioncannon 20-02-2005 02:01 AM

oh and you know what the smallest program possible?

Code:

int main()
{
}


Kon-Tiki 20-02-2005 05:22 AM

Cool work :ok: Next step: making a small textbased RPG in which you create a character, then battle random monsters (list of five monsters'll do the trick :D )

taikara 20-02-2005 05:26 AM

My favorite program I did while learning was an artificial psychologist, using switches.

whee.

I asked it questions for hours.

Like:

Me: Am I crazy?
Dr: Yes, that does sound like an interesting theory.


Kon-Tiki 20-02-2005 05:34 AM

Mine was a toilet simulator. It first asked whether you're male or female, then what you'd do. If you'd poo while standing, you'd get a message 'bout it dropping down into your pants. If you're a guy and you're peeing while not moving the seat up, you'd get a message 'bout that. As a female, you'd get some message 'bout it running down your legs. Biggest difference was that males could pee while standing and females could menstruate. Sick little thing, and nobody wants to give it back for a Windows remake with pics. Still was a good coding exercise; a good laugh and is quite notorious under my friends.


The current time is 06:58 AM (GMT)

Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.