记录详情

Compile Error

/in/foo.c: In function 'main':
/in/foo.c:12:25: error: invalid suffix "x" on integer constant
   12 |                 y=2*x*x+4x-5;
      |                         ^~
/in/foo.c:13:27: warning: conversion lacks type at end of format [-Wformat=]
   13 |                 printf("%.3",y);
      |                           ^
/in/foo.c:13:24: warning: too many arguments for format [-Wformat-extra-args]
   13 |                 printf("%.3",y);
      |                        ^~~~~
/in/foo.c:16:19: warning: implicit declaration of function 'sqrt' [-Wimplicit-function-declaration]
   16 |                 y=sqrt(5*x+10);
      |                   ^~~~
/in/foo.c:2:1: note: include '<math.h>' or provide a declaration of 'sqrt'
    1 | #include <stdio.h>
  +++ |+#include <math.h>
    2 | 
/in/foo.c:16:19: warning: incompatible implicit declaration of built-in function 'sqrt' [-Wbuiltin-declaration-mismatch]
   16 |                 y=sqrt(5*x+10);
      |                   ^~~~
/in/foo.c:16:19: note: include '<math.h>' or provide a declaration of 'sqrt'
/in/foo.c:17:27: warning: conversion lacks type at end of format [-Wformat=]
   17 |                 printf("%.3",y);
      |                           ^
/in/foo.c:17:24: warning: too many arguments for format [-Wformat-extra-args]
   17 |                 printf("%.3",y);
      |                        ^~~~~
/in/foo.c:21:27: warning: conversion lacks type at end of format [-Wformat=]
   21 |                 printf("%.3",y);
      |                           ^
/in/foo.c:21:24: warning: too many arguments for format [-Wformat-extra-args]
   21 |                 printf("%.3",y);
      |                        ^~~~~

信息

递交者
类型
自测
语言
C
递交时间
2025-11-06 17:27:42
评测时间
2025-11-06 17:27:42
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes