#include <iostream>
#include <cmath>
#include <iomanip>
using namespace std;
const float pi=3.14;
const float e=2.71828;
int main()
int r,h;
double A,E1,E2;
cout<< "please enter two positive integers for r and h: "<<endl;
cin>>r>>h;
A=(2*pi*r*r+2*r*r*h);
E1=(pow(e,h))+(3*(log10(A)));
E2=sqrt(abs(cos(pow(r,2.0)+sin(pow(r,2.0)));
cout<<"Radius Height Area E1 E2"<<endl;
cout<<fixed<<setprecision(2)<<showpoint;
cout<<"====== ====== ==== == =="<<endl;
cout<<setw(6)<<r<<setw(12)<<h<<setw(10)<<A<<setw(8)<<E1<<setw(8)<<E2<<endl;
return 0;
}
Error list:
Warning 1 warning C4305: 'initializing' : truncation from 'double' to 'const float'
Warning 2 warning C4305: 'initializing' : truncation from 'double' to 'const float'
what could i do ?