AgentGOD 0 Posted June 1, 2006 /*C owns so much..........* *Hardcore simple program created by AgentGOD, in C* *This will demonstrate how much better using the ANSI C headers*/ #include <stdio.h> // :) Just to show off different ways to comment code /* Here of course, we have the standard input output for ANSI C */ const int ArraySize = 50; /*This here defines a constant containing the total array size* *of course there are ways to create dynamically adjustable arrays...* *but I won't get into that now, i want to keep things simple.*/ int main() { char fname[255]; //"String" variable, really its just a char array with 255 spaces allocated int Numbers[ArraySize], inNumber, Count = 0; //Int variables printf("Please type your first name: "); //prompter;) scanf("%s", &fname); //uses scanf to store your name printf("Your first name is %s\n", fname); printf("Enter an integer (enter -999 to quit): "); scanf("%d", &inNumber); while((inNumber != -999) && (Count < 50)) //conditional while loop { Numbers[Count] = inNumber; printf("Enter another integer (enter -999 to quit): "); scanf("%d", &inNumber); ++Count; } printf("You have entered the following integers: \n"); for(int x = 0; Numbers[x] != -858993460; ++x) printf("%d\n", Numbers[x]); return 0; } Here you go my newbs... *HYPNOTIK*I COMMAND YOU TO LEARN..... LEARRRNN..... LEEAAARRRRNNN!!!!*/* Share this post Link to post
ShadowDemon 0 Posted December 29, 2007 eh? so what language are you writing in x_x why is programming so difficult x_x elwell thanks for sharing i guess. Share this post Link to post
Cripp 167 Posted December 29, 2007 Dude this was posted in 2006 please look at the dates before posting. Share this post Link to post
Protoman 56 Posted December 29, 2007 Dude this was posted in 2006 please look at the dates before posting. Yeah, but while were on the topic, i'd like to point out the difficulty. Programming in C++ isn't daunting if you thoroughly study the keys and strings. I'm currently reading a book explaining C++ and its easy. ^_^ Share this post Link to post
Dr.Winkey 57 Posted January 25, 2008 True C++ is easy but only if you can do the math. Share this post Link to post
bigpepe 0 Posted February 7, 2008 True C++ is easy but only if you can do the math. I can do the math, cause I kick ass Share this post Link to post