Main.cc: In function ‘int main()’: Main.cc:5:30: warning: too many arguments for format [-Wformat-extra-args] printf("%8d%8d%%8d",a,b,c); ^ Main.cc:6:5: error: ‘cout’ was not declared in this scope cout<<" "; ^~~~ Main.cc:6:5: note: suggested alternative: In file included from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:75:0, from Main.cc:1: /usr/include/c++/7/iostream:61:18: note: ‘std::cout’ extern ostream cout; /// Linked to standard output ^~~~ Main.cc:4:10: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%d%d%d",&a,&b,&c); ~~~~~^~~~~~~~~~~~~~~~~~~