fork download
  1. #include <stdio.h> //Для printf
  2. #include <math.h> //Для round, roundf, roundl
  3.  
  4. int main (void)
  5. {
  6. //Вывод значения аргумента
  7. printf (“Аргумент: 2.83\n”);
  8. //Расчет и вывод результата работы функции roundf
  9. printf (“roundf : %.1f\n”, roundf (2.83) );
  10. //Расчет и вывод результата работы функции round
  11. printf (“round : %.1f\n”, round (2.83) );
  12. //Расчет и вывод результата работы функции roundl
  13. printf (“roundl : %.1Lf\n”, roundl (2.83) );
  14.  
  15. return 0;
  16. }
Compilation error #stdin compilation error #stdout 0s 9424KB
stdin
0.3
0.5
0.6
0.3
-0.3
-0.7
4.5
5.3
compilation info
prog.c: In function ‘main’:
prog.c:7:12: error: stray ‘\342’ in program
    printf (“Аргумент: 2.83\n”);
            ^
prog.c:7:13: error: stray ‘\200’ in program
    printf (“Аргумент: 2.83\n”);
             ^
prog.c:7:14: error: stray ‘\234’ in program
    printf (“Аргумент: 2.83\n”);
              ^
prog.c:7:15: error: stray ‘\320’ in program
    printf (“Аргумент: 2.83\n”);
               ^
prog.c:7:16: error: stray ‘\220’ in program
    printf (“Аргумент: 2.83\n”);
                ^
prog.c:7:17: error: stray ‘\321’ in program
    printf (“Аргумент: 2.83\n”);
                 ^
prog.c:7:18: error: stray ‘\200’ in program
    printf (“Аргумент: 2.83\n”);
                  ^
prog.c:7:19: error: stray ‘\320’ in program
    printf (“Аргумент: 2.83\n”);
                   ^
prog.c:7:20: error: stray ‘\263’ in program
    printf (“Аргумент: 2.83\n”);
                    ^
prog.c:7:21: error: stray ‘\321’ in program
    printf (“Аргумент: 2.83\n”);
                     ^
prog.c:7:22: error: stray ‘\203’ in program
    printf (“Аргумент: 2.83\n”);
                      ^
prog.c:7:23: error: stray ‘\320’ in program
    printf (“Аргумент: 2.83\n”);
                       ^
prog.c:7:24: error: stray ‘\274’ in program
    printf (“Аргумент: 2.83\n”);
                        ^
prog.c:7:25: error: stray ‘\320’ in program
    printf (“Аргумент: 2.83\n”);
                         ^
prog.c:7:26: error: stray ‘\265’ in program
    printf (“Аргумент: 2.83\n”);
                          ^
prog.c:7:27: error: stray ‘\320’ in program
    printf (“Аргумент: 2.83\n”);
                           ^
prog.c:7:28: error: stray ‘\275’ in program
    printf (“Аргумент: 2.83\n”);
                            ^
prog.c:7:29: error: stray ‘\321’ in program
    printf (“Аргумент: 2.83\n”);
                             ^
prog.c:7:30: error: stray ‘\202’ in program
    printf (“Аргумент: 2.83\n”);
                              ^
prog.c:7:31: error: expected expression before ‘:’ token
    printf (“Аргумент: 2.83\n”);
                               ^
prog.c:7:37: error: stray ‘\’ in program
    printf (“Аргумент: 2.83\n”);
                                     ^
prog.c:7:39: error: stray ‘\342’ in program
    printf (“Аргумент: 2.83\n”);
                                       ^
prog.c:7:40: error: stray ‘\200’ in program
    printf (“Аргумент: 2.83\n”);
                                        ^
prog.c:7:41: error: stray ‘\235’ in program
    printf (“Аргумент: 2.83\n”);
                                         ^
prog.c:9:12: error: stray ‘\342’ in program
    printf (“roundf : %.1f\n”, roundf (2.83) );
            ^
prog.c:9:13: error: stray ‘\200’ in program
    printf (“roundf : %.1f\n”, roundf (2.83) );
             ^
prog.c:9:14: error: stray ‘\234’ in program
    printf (“roundf : %.1f\n”, roundf (2.83) );
              ^
prog.c:9:22: error: expected ‘)’ before ‘:’ token
    printf (“roundf : %.1f\n”, roundf (2.83) );
                      ^
prog.c:9:28: error: stray ‘\’ in program
    printf (“roundf : %.1f\n”, roundf (2.83) );
                            ^
prog.c:9:30: error: stray ‘\342’ in program
    printf (“roundf : %.1f\n”, roundf (2.83) );
                              ^
prog.c:9:31: error: stray ‘\200’ in program
    printf (“roundf : %.1f\n”, roundf (2.83) );
                               ^
prog.c:9:32: error: stray ‘\235’ in program
    printf (“roundf : %.1f\n”, roundf (2.83) );
                                ^
prog.c:9:15: warning: passing argument 1 of ‘printf’ from incompatible pointer type [-Wincompatible-pointer-types]
    printf (“roundf : %.1f\n”, roundf (2.83) );
               ^~~~~~
In file included from prog.c:1:0:
/usr/include/stdio.h:364:12: note: expected ‘const char * restrict’ but argument is of type ‘__attribute__((const)) float (*)(float)’
 extern int printf (const char *__restrict __format, ...);
            ^~~~~~
prog.c:11:12: error: stray ‘\342’ in program
    printf (“round : %.1f\n”, round (2.83) );
            ^
prog.c:11:13: error: stray ‘\200’ in program
    printf (“round : %.1f\n”, round (2.83) );
             ^
prog.c:11:14: error: stray ‘\234’ in program
    printf (“round : %.1f\n”, round (2.83) );
              ^
prog.c:11:21: error: expected ‘)’ before ‘:’ token
    printf (“round : %.1f\n”, round (2.83) );
                     ^
prog.c:11:27: error: stray ‘\’ in program
    printf (“round : %.1f\n”, round (2.83) );
                           ^
prog.c:11:29: error: stray ‘\342’ in program
    printf (“round : %.1f\n”, round (2.83) );
                             ^
prog.c:11:30: error: stray ‘\200’ in program
    printf (“round : %.1f\n”, round (2.83) );
                              ^
prog.c:11:31: error: stray ‘\235’ in program
    printf (“round : %.1f\n”, round (2.83) );
                               ^
prog.c:11:15: warning: passing argument 1 of ‘printf’ from incompatible pointer type [-Wincompatible-pointer-types]
    printf (“round : %.1f\n”, round (2.83) );
               ^~~~~
In file included from prog.c:1:0:
/usr/include/stdio.h:364:12: note: expected ‘const char * restrict’ but argument is of type ‘__attribute__((const)) double (*)(double)’
 extern int printf (const char *__restrict __format, ...);
            ^~~~~~
prog.c:13:12: error: stray ‘\342’ in program
    printf (“roundl : %.1Lf\n”, roundl (2.83) );
            ^
prog.c:13:13: error: stray ‘\200’ in program
    printf (“roundl : %.1Lf\n”, roundl (2.83) );
             ^
prog.c:13:14: error: stray ‘\234’ in program
    printf (“roundl : %.1Lf\n”, roundl (2.83) );
              ^
prog.c:13:22: error: expected ‘)’ before ‘:’ token
    printf (“roundl : %.1Lf\n”, roundl (2.83) );
                      ^
prog.c:13:25: error: invalid suffix "Lf" on floating constant
    printf (“roundl : %.1Lf\n”, roundl (2.83) );
                         ^~~~
prog.c:13:29: error: stray ‘\’ in program
    printf (“roundl : %.1Lf\n”, roundl (2.83) );
                             ^
prog.c:13:31: error: stray ‘\342’ in program
    printf (“roundl : %.1Lf\n”, roundl (2.83) );
                               ^
prog.c:13:32: error: stray ‘\200’ in program
    printf (“roundl : %.1Lf\n”, roundl (2.83) );
                                ^
prog.c:13:33: error: stray ‘\235’ in program
    printf (“roundl : %.1Lf\n”, roundl (2.83) );
                                 ^
prog.c:13:15: warning: passing argument 1 of ‘printf’ from incompatible pointer type [-Wincompatible-pointer-types]
    printf (“roundl : %.1Lf\n”, roundl (2.83) );
               ^~~~~~
In file included from prog.c:1:0:
/usr/include/stdio.h:364:12: note: expected ‘const char * restrict’ but argument is of type ‘__attribute__((const)) long double (*)(long double)’
 extern int printf (const char *__restrict __format, ...);
            ^~~~~~
stdout
Standard output is empty