Runtime Error

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

信息

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