I get an error saying, "exit status 1 expected initializer before 'void'."
Functions must have a body. So instead of:
void setup()

You need:
void setup()
  {
  // do nothing
  }


You have other issues, for example this is not C++:
  int (n,i,j,result);

That should be:
  int n,i,j,result;

Also you are returning 0, when void functions don't return a value.
Also, here:
  printf(&quot;enter N Value&quot;);

  scanf (&quot;%d&quot;, &amp;n);

Where is this value coming from? There isn't a keyboard on the Arduino.
See: scanf

The C library function int scanf(const char *format, ...) reads formatted input from stdin.

The Arduino is a microprocessor. It doesn't have stdin.