fork download
  1. #include <iostream>
  2. #include <string>
  3.  
  4. int main()
  5. {
  6. int k=0,N=0,PI=3.14;
  7. float S=0,s=0,y=0;
  8.  
  9. y= PI/8;
  10. printf("VVEDITE KOL-VO POVTORENIY N \n");
  11. scanf("%i",&N);
  12. printf("\n\n");
  13.  
  14. for(k=0; k<=(N-1); k++);
  15. {
  16. s=1/((4*k+1)*(4*k+3));
  17.  
  18. S+=s;
  19. printf("S%i=%.10f\n",k+1,S);
  20. }
  21. printf("S=%.10f\ty=%.10f\n",S,y);
  22.  
  23.  
  24. getc();
  25.  
  26. return 0;
  27. }
Compilation error #stdin compilation error #stdout 0s 15224KB
stdin
10
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:24:6: error: too few arguments to function ‘int getc(FILE*)’
 getc();
      ^
In file included from /usr/include/c++/6/cstdio:42:0,
                 from /usr/include/c++/6/ext/string_conversions.h:43,
                 from /usr/include/c++/6/bits/basic_string.h:5417,
                 from /usr/include/c++/6/string:52,
                 from /usr/include/c++/6/bits/locale_classes.h:40,
                 from /usr/include/c++/6/bits/ios_base.h:41,
                 from /usr/include/c++/6/ios:42,
                 from /usr/include/c++/6/ostream:38,
                 from /usr/include/c++/6/iostream:39,
                 from prog.cpp:1:
/usr/include/stdio.h:534:12: note: declared here
 extern int getc (FILE *__stream);
            ^~~~
stdout
Standard output is empty