有一函数 请编程序计算y的值(x的值由键盘输入
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/12 18:38:42
#include#includeusingnamespacestd;intmain(){doublex,y;cin>>x;if(x
functionz=yourfunc(x,y)%scriptforf(x,y)=x2+cos(xy)+2y%inputscalar:x,y%outputscalar:z%writtenbyyourna
#includemain(){doublex,y,z=0;scanf("%f,%f",&x,&y);z=x*x+sin(3.14*x*y/180)+2*y;printf("%f",z);}ps:如果是
#include#includemain(){floatx,y;scanf("%f",&x);if(x
#includeusingnamespacestd;doublefun(doublex){\x05if(x>-10&&x-5&&x5&&xx;\x05\x05cout再问:麻烦用C语言写一下再答:#i
voidmain(){intx,inty;printf("请输入X的值:");scanf("%d",&x);printf("\n");if(x
publicstaticintfun(intx){if(x>0)return10;elseif(x==9)return1;elsereturn-10;}publicstaticvoidmain(Str
#include#includevoidmain(){doublex;doubley;coutx;if(-2
#includevoidmain(){intx,y;//你用的是浮点型,我改成整形的了...你如果真的要用浮点的话...要加上小数点,如2.0等...printf("x=");scanf("%d",&
#include<stdio.h>int main(){\x09int x,y;\x09printf("输入x的值:"); \x09sca
input"输入数"toxdocasecasex=3andx6y=SQRT(2*SIN(3*X)+X)endcase再问:我就是这样做的,但是程序运行不了,要用自定义函数来做,就是含有return语句
#include#includeintmain(){doubled;scanf("%lf",&d);printf("|y|=%.2lf\n",fabs(d));return0;}
ifx>=0theny=xelsey=-xendifprinty
#include//希望对您有用#includeintmain(){intx,y;printf("Pleaseenterthenumber:");scanf("%d",&x);if(x
要求用什么语言?再问:c语言。。。我怕写的不对
#includeusingnamespacestd;voidmain(){coutx;if(x
longsum_ji(intx)//奇数之和{if(x%2==0){x--;}return(long)x*(long)x/4;}longsum_ou(intx)//偶数之和{if(x%2!=0){x-
voidmain(){floatx,y;cin>>x;if(x=10)y=3*x-11;elsey=2*x-1;cout
程序框图?你说的是程序设计?这个直接用(比如java里面),用math里面的方法直接得到.
亲,弄个函数,将x,和y传参进去,调用的时候制定x和y的值,将结果返回就可以了<script type="text/javascript"> &nb