Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
69738 石晋骁 06小数除法 C++ Compile Error 0 MS 0 KB 146 2024-04-06 14:50:02

Tests(0/0):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ double a,b; scanf("%lf" , &a,&b);a printf("%.2lf" , a-(int)a%b); return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:5:21: warning: too many arguments for format [-Wformat-extra-args]
  scanf("%lf" , &a,&b);a
                     ^
Main.cc:6:2: error: expected ';' before 'printf'
  printf("%.2lf" , a-(int)a%b);
  ^
Main.cc:6:30: warning: statement has no effect [-Wunused-value]
  printf("%.2lf" , a-(int)a%b);
                              ^
Main.cc:5:22: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%lf" , &a,&b);a
                      ^