Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
87237 黄睿杰 求梯形的面积 C++ Compile Error 0 MS 0 KB 130 2024-08-07 19:50:47

Tests(0/0):


Code:

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


Run Info:

Main.cc: In function 'int main()':
Main.cc:6:26: warning: format '%lf' expects argument of type 'double', but argument 2 has type 'int' [-Wformat=]
  printf("%.2lf",(a+b)*h/2)
                          ^
Main.cc:7:2: error: expected ';' before 'return'
  return 0;
  ^