So I tried this:
[code]#include <stdio.h>
int main(int argc, const char * argv[])
{
int number = 5;
printf(""%d" squared is “%d”.\n", number, number^2);
return 0;
}
[/code]
But I get this:
[quote]“5” squared is “7”.
Program ended with exit code: 0[/quote]
I thought that ^ was how to get an exponent, as in number*number? Not sure where 7 came from.
Any help?
Thanks!