Pages

Saturday, August 13, 2011

d059. 數學函數練習


#include
#include
#include //格式控制
using namespace std;
int main() {
double a,b;
cin>>a>>b;
cout << pow(a,b) << endl ; //a 的 b 次方

double c;
cin>>c;
cout << fixed << setprecision(3) << sqrt(c) << endl ;

int d;
cin>>d;
cout<
int e,f;
cin>>e>>f;
cout<<(rand()%(f-e))+e << endl ;

return 0;
}

No comments:

Post a Comment