I need little help

done
Last edited on
someone please help?
counter.cpp:46: error: `k' cannot be used as a function
you're using k as a function here:
if (k(n)%2==1)

should be something like this:
if (k%2 == 1)

This line is just missing a <. It should be cube << endl not cube < endl;
cout<<" Cube of n = "<<cube<endl;

Also get rid of the { about int main() and all functions that do not return void should return something
thanks alot man it fixed :)
and i am confusing on this one
counter.cpp:84: error: expected unqualified-id before '{' token
counter.cpp:84: error: expected `,' or `;' before '{' token
if you remove the { about int main() that should go away. It's just improper syntax to put a curly brace above main without first closing it. It isn't needed in other words
Topic archived. No new replies allowed.