ÄÚÈÝ·¢²¼¸üÐÂʱ¼ä : 2024/12/24 3:48:29ÐÇÆÚÒ» ÏÂÃæÊÇÎÄÕµÄÈ«²¿ÄÚÈÝÇëÈÏÕæÔĶÁ¡£
ʵÑé1.1
#include \#include \void main() {
int x; cin>>x; int y; y=x*x;
cout<<\}
ʵÑé1.2
#include \void main() {
float x=1,y=2,h=3,s; s=h*(x+y)/2.0;
cout<<\Éϵ×Ϊ1£¬Ïµ×Ϊ2£¬¸ßΪ3µÄÌÝÐÎÃæ»ýΪ£º\}
ʵÑé1.3
#include \void main() {
float x,y,z,s;
cout<<\ÇëÊäÈëÈýÃųɼ¨x,y,z£º\ cin>>x>>y>>z; s=(x+y+z)/3;
cout<<\ÈýÃÅ¿Îƽ¾ù³É¼¨Îª£º\}
ʵÑé2.1
#include \#include \void main() {
float s1,s2,s3; double aver;
cout<<\ÊäÈëÈý¸öÊý¾Ý£º\ cin>>s1>>s2>>s3; aver=(s1+s2+s3)/3; aver=aver*100+0.5; aver=(int)aver; aver=aver/100;
cout<<\ƽ¾ùÖµ=\}
ʵÑé2.2
#include \#include \void main() {
double x,y,z;
cout<<\ÇëÊäÈëÖ±½ÇÈý½ÇÐεÄÁ½Ö±½Ç±ß³¤£º\ cin>>x>>y;
z=sqrt(x*x+y*y);
cout<<\¸ÃÖ±½ÇÈý½ÇÐεÄб±ß³¤Îª£º\}
ʵÑé2.3
#include \void main() {
double x,y,r,t;
cout<<\ÇëÊäÈëx y\cin>>x>>y; r=x*x+y*y;
if (r<=16 && r>=4) t=12*3.1415926; else t=0;
cout< ʵÑé2.4 #include \void main() { double a,b,c,t,ave; cout<<\ÇëÊäÈëÈý¸öÊý\cin>>a>>b>>c; if (a ave=(a+b+c)/3; cout<<\Èý¸öÊýµÄƽ¾ùֵΪ\£¬ÆäÖÐ×îСµÄÊýΪ£º\}