Main.cc:6:9: warning: multi-character character constant [-Wmultichar] printf('%.2f',a*b/2); ^~~~~~ Main.cc: In function ‘int main()’: Main.cc:6:21: error: invalid conversion from ‘int’ to ‘const char*’ [-fpermissive] printf('%.2f',a*b/2); ^ In file included from /usr/include/stdio.h:862:0, from /usr/include/c++/7/cstdio:42, from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:46, from Main.cc:1: /usr/include/x86_64-linux-gnu/bits/stdio2.h:102:1: note: initializing argument 1 of ‘int printf(const char*, ...)’ printf (const char *__restrict __fmt, ...) ^~~~~~