请求高人编写以下C程序(本人用VC++6.0调试)非常感谢

来源:百度知道 编辑:UC知道 时间:2024/09/25 20:22:00
1.编一C程序,它能读入四个整数x、y、m、n,(输入时相邻的整数用空格隔开,m、n都是正整数)分别计算并输出x的m次根的值和y的n次根的值。
(注:可执行程序命名为e1.exe,存于你的账号或其debug目录下)

#include <iostream>
#include<conio.h>
#include<math.h>
using namespace std;
int main()
{
double x,y,m,n;
cout<<"输入四个数, 用空格隔开"<<endl;
cin>>x>>y>>m>>n;
cout<<x<<"的"<<m<<"次幂="<<pow(x,1/m)<<endl;
cout<<y<<"的"<<n<<"次幂="<<pow(y,1/n)<<endl;
getch();
return 0;
}