郑州市公租房申请条件:求一段程序

来源:百度文库 编辑:神马品牌网 时间:2024/05/02 09:42:53
程序实现的是
(1)要求输入R和a 的值,都定义为实数,程序能够自动动计算出下列方程并输出
r=Rcosb+Rsinb+Rbcota
其中b为参数直接输出
用C编

#include<stdio.h>
#include<math.h>
main()
{
double R,a,s;
printf("plz input R and a:");
scanf("%lf%lf",&R,&a);
s=R*atan(a);
printf("r=%lfcosb+%lfsinb+%lfb\n",R,R,s);
}