foo.cpp:1:1: error: 'include' does not name a type
include <iostream> include <cstdio> include <cstring>
^
foo.cpp: In function 'int main()':
foo.cpp:9:14: error: 'scanf' was not declared in this scope
scanf("%d",&n);
^
foo.cpp:10:18: error: 'sprintf' was not declared in this scope
sprintf(st,"%d",n);
^
foo.cpp:11:14: error: 'strlen' was not declared in this scope
len=strlen(st);
^
foo.cpp:12:27: error: 'printf' was not declared in this scope
if (st[0]=='-') printf("-");
^
foo.cpp:16:20: error: 'printf' was not declared in this scope
printf("%c",st[len]);
^
foo.cpp:18:28: error: 'printf' was not declared in this scope
if (st[0]=='-') printf("\n");
^
foo.cpp:19:25: error: 'printf' was not declared in this scope
else printf("%c\n",st[0]);
^