its the first program i actually wrote in C. It works thru cmd.
Note that ive never learned C before and it took me only 1-2 hours to write it totally on my own.
C is quite easy actually
was thinking to make calculator, but its kind a waste of time. Its very easy to make tho. Kind a got tired of reading C tutorials so blah...but ill make simple calculator next...or something similiar.
edit:
oh yeah .. heres the source code too:
Code: Select all
#include <stdio.h>
int main()
{
int number;
printf( "Enter a number to check if its smaller or bigger than 303: " );
scanf( "%d", &number );
if ( 303 < number )
printf( "number is bigger than 303" );
if ( 303 > number )
printf( "number is smaller than 303" );
if ( 303 == number )
printf( "number is equal to 303" );
getchar();
printf( "\nPress enter to continue..." );
getchar();
printf( "\nEnter a number to check if its equal to 303: " );
scanf( "%d", &number );
if ( 303 == number )
printf( "number is equal to 303" );
else {
printf( "number is not equal to 303" );
}
getchar();
printf( "\nPress enter to quit..." );
getchar();
}