I got this from
About.
#include <stdio.h>
int main()
{
int luckyNumber = 5;
float radius = 2;
char myName[15] = "John";
char initial = 'J';
printf( "Hellow World!\n" ); /* the format string contains only o
ordinary characters. Ordinary characters
are output unmodified.
A character string in C is of type
"char *".*/
printf( "My lucky number is %d\n", luckyNumber ); /*The "%d" specifies
that an integer value will be output.*/
printf( "My name is %s\n", myName ); /* The %s specifies that a character
string will be output.*/
printf( "My first initial is %c\n", initial ); /*The %c specifies that a
character will be output.*/
printf( "The area of a circle with radius %f is %f\n", radius, 3.14* radius*radius );
//%f specifies that a float will be output
printf( "Hello %s or should I say %c\n", myName, initial );
//multiple arguments of different types may be output.
getchar();
return(0);
}
I realize there should be output with this program. I tried adding
#include <iostream> and
using namespace std; and changed all the
printf to
cout's with no success. After that I looked for grammatical errors. Then I used Google with the keyword "Press any key to continue" and even added "learning programming"(only not in quotes) to it. Nothing. I then did a search of the forums here and also found nothing. It seems like it should simply output something and I can't understand why.
Side note: My compiler occasionaly acts funny; freezing up, running high, rewriting words for me. I checked the help file and index and I have no clue why it's doing this.
Please help.
EDIT: Thanks you guys for the help. Ill attempt the database search and get the other version of DevC++ that DaWei suggested. Im not going to get too involved as my experience in this is low AND Ill be receiving a new system shortly, thus Ill put more effort into the new rig. I appreciate it.
Thanks. 