GTAStunting
General => General Discussion => Computer Talk => Topic started by: DarkMatter on June 29, 2006, 11:36:14 PM
-
Ok here it is, my first c++ program. It's extremely ghetoo (when you enter something other than intergers it will spaz). If someone here knows c++ please feel free to tell me how to improve apon this. The source file is included in the zip.
Download the attachment :[attachmentid=2262]
-
Im not downloading it , but is it source or compiled ? and whats it do
-
ive heard about C++, but im gonna stick with editing rather than creating thankyou
-
Lol, downloaded it pretty funny
-
I made somethig similar in Borland Pascal. Nice one.
-
Yea. I made it work correctly today (realized the aligator mouth was pointing in the wrong direction ) >
-
http://homepages.shu.ac.uk/~sgreasle/seang...als/cpp/3/3.htm (http://homepages.shu.ac.uk/~sgreasle/seang/Tutorials/cpp/3/3.htm)
There's the tutorial you used.
-
Lol yea you got it
-
I don't know nothing about C++...but the program fucks up if you say you are X years old (X=what ever that is not a number)
Looks to me like you did nothing but changed the messages and ages needed, but I guess you've gotta start somwhere
-
I did this tutorial step by step to understand some c++ commands and the syntax. I know it is basically copied but like i said. It's my first!
I am going to continue to learn c++ so expect some more programs from me.
-
LOL
type a letter in and see what it does
i made a prog like this with basic in the 5th grade
-
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char *argv[])
{
int iAge;
char szInput[128];
printf("Enter your age and press enter: ");
gets(szInput);
iAge = atoi(szInput);
if (iAge < 13) {
printf("You are a child because you are %d years old", iAge);
}
else if (iAge < 20) {
printf("You are a teenager because you are %d years old", iAge);
}
else if (iAge < 66) {
printf("You are an adult because you are %d years old", iAge);
}
else if (iAge < 136) {
printf("You are an old fart because you are %d years old", iAge);
}
else {
printf("Stop lying, idiot, you are not %d years old!", iAge);
}
return 0;
}
-
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char *argv[])
{
int iAge;
char szInput[128];
printf("Enter your age and press enter: ");
gets(szInput);
iAge = atoi(szInput);
if (iAge < 13) {
printf("You are a child because you are %d years old", iAge);
}
else if (iAge < 20) {
printf("You are a teenager because you are %d years old", iAge);
}
else if (iAge < 66) {
printf("You are an adult because you are %d years old", iAge);
}
else if (iAge < 136) {
printf("You are an old fart because you are %d years old", iAge);
}
else {
printf("Stop lying, idiot, you are not %d years old!", iAge);
}
return 0;
}
//--------------------------------
//Converted to Visual basic 6
//By [NwP] Gunner
//Original code by mikechml
//--------------------------------
Private Sub Form_Load()
Dim age
if age =< "13" then
msgbox "You are a child because you are " & age & " years old."
elseif age =< "20" then
msgbox "You are a teenager because you are " & age & " years old."
elseif age =< "66" then
msgbox "You are an adult because you are " & age & " years old."
elseif age =< "136" then
msgbox "You are an old fart because you are " & age & " years old."
else
msgbox "Stop lying, idiot, you are not " & age & " years old!"
end if
End Sub
PS. dont ask me why i converted it ;|.
-
Wow basic looks alot more basic compared to c++
-
gunners basic code is missing some stuff
-
yeah well, you'd have to add a textbox yourself in the designer mode
-
oh for crying out loud this is the easiest kind of program u can even create...man..if u'd visit my sql..you would learn C++...real deal:D not some lame if else function thingys:D
i love c++
-
Nice bump
-
Nice bump
Nice useless comment.
-
Nice bump
Nice useless comment.
Nice useless comment on his comment.
(this post wasn't useless because i needed to tell that his post was useless so he doesn't make useless post in some useless time again)
-
lmao
b²t i would say...
-
Links dead1!11
-
Few years back i was crazy for C++, now I'm on break. Hmmn, maybe it's time to go back to it.
*installing C++*
-
im gonna write a C++ tutorial and post it here....i got notn else to do:D