fork download
  1. #include <stdio.h>
  2. void cube(double n);
  3. int main(void)
  4. {
  5. double number;
  6. printf("Enter number: ");
  7. scanf("%Lf", &number);
  8. cube(number);
  9. return 0;
  10. }
  11. void cube(double n)
  12. {
  13. printf("Cube of this number is: %Lf", n * n * n);
  14. }
  15.  
Compilation error #stdin compilation error #stdout 0s 9424KB
stdin
4.999988899999
compilation info
prog.c: In function ‘main’:
prog.c:7:11: error: format ‘%Lf’ expects argument of type ‘long double *’, but argument 2 has type ‘double *’ [-Werror=format=]
  scanf("%Lf", &number);
           ^
prog.c: In function ‘cube’:
prog.c:15:36: error: format ‘%Lf’ expects argument of type ‘long double’, but argument 2 has type ‘double’ [-Werror=format=]
  printf("Cube of this number is: %Lf", n * n * n);
                                    ^
cc1: all warnings being treated as errors
stdout
Standard output is empty