给出一段代码提供参考
#include <iostream>
#include <cmath>
using namespace std ;
int main()
{
int a ,b,d;
double c,e;
cout << "请输入长方形的长 : " ;
cin >> a;
cout << "请输入长方形的宽 : " ;
cin >> b;
c = sqrt((double)(a * a + b * b));
d = 2 * (a + b);
e =a * b ;
cout << "长方形的对角线为 : " << c << endl ;
cout << "长方形的周长为 : " << d << endl ;
cout << "长方形的面积为: " << e << endl ;
}