Runtime Error

foo.cc: In function 'int main()':
foo.cc:6:11: warning: format '%lf' expects argument of type 'double*', but argument 2 has type 'double' [-Wformat=]
    6 |  scanf("%lf,%lf,%c",a,b,c);
      |         ~~^         ~
      |           |         |
      |           double*   double
foo.cc:6:15: warning: format '%lf' expects argument of type 'double*', but argument 3 has type 'double' [-Wformat=]
    6 |  scanf("%lf,%lf,%c",a,b,c);
      |             ~~^       ~
      |               |       |
      |               double* double
foo.cc:6:18: warning: format '%c' expects argument of type 'char*', but argument 4 has type 'int' [-Wformat=]
    6 |  scanf("%lf,%lf,%c",a,b,c);
      |                 ~^      ~
      |                  |      |
      |                  char*  int
foo.cc:4:15: warning: unused variable 'e' [-Wunused-variable]
    4 |  double a,b,d,e;
      |               ^
foo.cc:6:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
    6 |  scanf("%lf,%lf,%c",a,b,c);
      |  ~~~~~^~~~~~~~~~~~~~~~~~~~
foo.cc:6:7: warning: 'c' is used uninitialized in this function [-Wuninitialized]
    6 |  scanf("%lf,%lf,%c",a,b,c);
      |  ~~~~~^~~~~~~~~~~~~~~~~~~~
foo.cc:6:7: warning: 'a' is used uninitialized in this function [-Wuninitialized]
foo.cc:6:7: warning: 'b' is used uninitialized in this function [-Wuninitialized]
[Hydro](https://hydro.ac)提供评测服务
# 状态 耗时 内存占用
#1 Runtime Error Segmentation fault 2ms 384.0 KiB
#2 Runtime Error Segmentation fault 2ms 384.0 KiB
#3 Runtime Error Segmentation fault 5ms 384.0 KiB
#4 Runtime Error Segmentation fault 4ms 384.0 KiB
#5 Runtime Error Segmentation fault 4ms 384.0 KiB

信息

递交者
类型
递交
题目
P1029 简单计算器
语言
C++
递交时间
2022-07-28 23:18:18
评测时间
2022-07-28 23:18:18
评测机
分数
0
总耗时
20ms
峰值内存
384.0 KiB