I am 13 and learning c programming and so I have an incredibly basic understanding of c programming. I'm learning how to 'Display Variable Values',I'm using VERY basic code but when i try to compile it using GNU (MinGW) it tells me...
vars.c:4:1: error: expected declaration specifiers or '...' before '(' token
Please may someone tell me how i could fix this!
This is the code:
#include <stdio.h>
int main(
(printf( "Integer is %d \n",num);
(printf( "Values are %d and %f \n",num,pi);
(printf( "%%7d displays %7d \n",num);
(printf( "%%07d displays %07d \n",num);
(printf( "Pi is approximately %1.10f \n",pi);
(printf( "Right-aligned %20.3f rounded pi \n",pi);
(printf( "Left-aligned %-20.3f rounded pi \n",pi);
return 0 ;)
)
({
int num = 100;
double pi = 3.1415926536;
(return 0 ;)
})