Main.cc: In function ‘int main()’:
Main.cc:10:11: error: expected primary-expression before ‘%’ token
scanf(%lf, &a);
^
Main.cc:10:12: error: ‘lf’ was not declared in this scope
scanf(%lf, &a);
^~
Main.cc:15:15: error: ‘n’ was not declared in this scope
while(tg>=n){
^