Alright so I barely know what I'm doing, and I see no reason why this isn't working.
All it's supposed to do is read an integer, and if it's over 100, say it's bigger than 100. If it's not, it'll say it's not bigger. Fairly simple, but I keep getting a warning that says:
Code:
lab02pe02.c: In function ‘main’:
lab02pe02.c:17:5: warning: too many arguments for format [-Wformat-extra-args]
lab02pe02.c:21:5: warning: too many arguments for format [-Wformat-extra-args]
Actual C Program:
Code:
#include <stdio.h>
int main( int argc, char *argv[] )
{
int x;
printf( "Enter an integer value:" );
scanf( "%d", &x );
if ( x > 100)
{
printf( "The number is bigger than 100.\n", x);
}
else
{
printf( "The number is not bigger than 100.\n", x);
}
return 0;
}
For my class we have to fill out the "int main(...)" with arguments. Can't just leave it.
Any suggestions?