The error source is here:
#define tariff 25;
The preprocessor will replace the occurence of
tariff
with
25;
so that the compiler later sees this line:
ebill=ebill+25;*(eusage[j]/1000.0);
The semicolon defines the end of an expression and
*(eusage[j]/1000.0)
is interpreted as another expression where the indirection operator (*) is applied to a non-pointer value.
So change it to:
#define tariff 25
But there is also another error in your code. The line
for(j=0,j<duration;j++;)
should probably be
for(j=0;j<duration;j++)