Reputation: 1
I am about as nooby to this as it gets. Can someone please tell me how to fix this?
#include <stdio.h>
int main(int argc, const char * argv[])
{
int sum;
sum = 50 + 25;
"The sum of 50 and 25 is %i", sum ;
return 0;
}
Upvotes: 0
Views: 1017
Reputation: 89509
Change the line:
"The sum of 50 and 25 is %i", sum ;
to:
printf( "The sum of 50 and 25 is %i", sum );
The line in quotes by itself is a syntax error that just happens to be getting by the compiler (which is apparently throwing a warning instead).
Upvotes: 3
Reputation: 10860
You have this warning because of not using your sum value. To print it use NSLog
Upvotes: 0