Main.cc: In function 'int main()': Main.cc:7:18: warning: format '%f' expects argument of type 'double', but argument 2 has type 'long double' [-Wformat=] printf("%.2f",d) ^ Main.cc:8:5: error: expected ';' before 'return' return 0; ^