C++ç»ä¹ é¢å¤§èè
æ¬ä¹¦å
±å
å«åä¸ªç« èçå
容
第ä¸ç« C++è¯è¨çæ¦è¿°
ä¸ãç®çé¢
1ï¼ C++çåè¯å
å«é£å ç§ï¼
2ï¼ ä¸ä¸ªæ è¯ç¬¦ä¸çé¦å符å¿
é¡»æ¯ä»ä¹å符ï¼å
¶ä½ä½ç½®ä¸çå符å¿
é¡»æ¯ä»ä¹å符ï¼
3ï¼ æ°å¼å¸¸éãå符常éãå符串常éåæ è¯ç¬¦å¨è¡¨ç¤ºä¸åæä»ä¹åºå«ï¼
4ï¼ C++è¯å¥å为åªå ç±»ï¼
5ï¼ #includeå½ä»¤çæ ¼å¼ååè½åæ¯ä»ä¹ï¼ä½¿ç¨å°æ¬å·ååå¼å·å¨å«ä¹ä¸æä»ä¹åºå«ï¼
6ï¼ ä½ å·²ç»ç¥éäºé£å 个系ç»å¤´æ件ï¼
7ï¼ coutåcin æ è¯ç¬¦çå«ä¹æ¯ä»ä¹ï¼ä»ä»¬åé¢åå«ä½¿ç¨ä»ä¹è¿ç®ç¬¦ï¼åè¿ç®ç¬¦çä½ç¨æ¯ä»ä¹ï¼
8ï¼ ä¸æºè¿è¡ä¸ä¸ªç¨åºéè¦ç»è¿é£äºé¶æ®µï¼
äºã填空é¢
1ï¼ ç¨åºä¸çé¢å¤çå½ä»¤æ¯æ以______å符å¼å¤´çå½ä»¤ã
2ï¼ ä¸æ¡ç®åè¯å¥æ¯ä»¥______å符ä½ä¸ºç»æ符çï¼ä¸æ¡å¤åè¯å¥æ¯åå«ä»¥______å符å______å符ä½ä¸ºå¼å§ç¬¦åç»æ符çã
3ï¼ ç©ºç½ç¬¦æ¯______符ã______符ãå______符çç»ç§°ã
4ï¼ å¨#includeå½ä»¤ä¸æå
å«ç头æ件ï¼å¯ä»¥æ¯______头æ件,ä¹å¯ä»¥æ¯______头æ件ã
5ï¼ ä½¿ç¨#includeå½ä»¤å¯ä»¥å
å«ä¸ä¸ªå¤´æ件ï¼ä¹å¯ä»¥å
å«ä¸ä¸ª______æ件ã
6ï¼ ä¸ä¸ªå½æ°å®ä¹ç±______å______两é¨åç»æã
7ï¼ ä¸ä¸ªç¨åºä¸å¿
é¡»æä¸ä¸ªå为______çå½æ°ã
8ï¼ å½æ°å¤´ä¸______è¯å¥ä¸æ ·é½è½å¤æä¾åºå½æ°çåæ°åè¿åç±»åçä¿¡æ¯ã
9ï¼ è¥ä¸ä¸ªå½æ°çå®ä¹å¤äºè°ç¨å®çå½æ°ä¹åï¼åå¨ç¨åºå¼å§å¯ä»¥çå»è¯¥å½æ°ç______è¯å¥ã
10ï¼ ä¸ä¸ªå½æ°çå½æ°ä½å°±æ¯ä¸æ¡______ã
11ï¼ C++头æ件åæºç¨åºæ件çæ©å±ååå«ä¸º______å______ã
12ï¼ ç¨åºæ件çç¼è¯é误å为______å______两类ã
13ï¼ å½ä½¿ç¨______ä¿çåä½ä¸ºå½æ°ç±»åæ¶ï¼è¯¥å½æ°ä¸è¿åä»»ä½å¼ã
14ï¼ å½å½æ°åæ°è¡¨ç¨______ä¿çå表示æ¶ï¼å表示该åæ°è¡¨ä¸ºç©ºã
15ï¼ ä»ä¸æ¡å½æ°ååè¯å¥âint fun1(void);âå¯ç¥ï¼è¯¥å½æ°çè¿åç±»å为______ï¼è¯¥å½æ°å¸¦æ______个åæ°ã
16ï¼ å½æ§è¡coutè¯å¥åC++æ¾ç¤ºè¾åºå±å¹è¾åºä¸ä¸ªæ°æ®é¡¹çå¼æ¶ï¼è¥è¯¥å¼çæ¾ç¤ºå®½åº¦ï¼å³æå æ¾ç¤ºä½ç½®çå符æ°ï¼ä¸ºnï¼åæ¾ç¤ºè¯¥å¼åå
æ å°ä»åä½ç½®å移______个å符æ¾ç¤ºä½ç½®ã
17ï¼ å½æ§è¡coutè¯å¥è¾åºendlæ°æ®é¡¹æ¶ï¼å°ä½¿C++æ¾ç¤ºè¾åºå±å¹ä¸çå
æ ä»å½åä½ç½®ç§»å¨å°______çå¼å§ä½ç½®ã
18ï¼ å½æ§è¡cinè¯å¥æ¶ï¼ä»é®çä¸è¾å
¥æ¯ä¸ªæ°æ®åå¿
é¡»è¾å
¥ä¸ä¸ª______符ï¼ç¶åæè½æ¥çè¾å
¥ä¸ä¸ä¸ªæ°æ®ã
ä¸ãååºä¸åç¨åºè¿è¡ç»æï¼æ¤é¢åä½ä¸ºä¸æºå®éªé¢
1ï¼ #include<iostream.h>
void main()
{
int x,y;
x=5;y=6;
cout<<âx+y=â<<x+y<<â,â;
cout<<âx*y=â<<x*y<<endl;
}
2ï¼ #include<iostream.h>
int cube(int);
void main(void)
{
cout<<âcube(3)=â<<cube(3)<<endl;
cout<<âcube(5)=â<<cube(5)<<endl;
cout<<âcube(8)=â<<cube(8)<<endl;
}
int cube(int x)
{
return x*x*x;
}
3ï¼ #include<iomanip.h>
#includeâabc.hâ
void main()
{
double a,b,c;
double averageValue;
a=2;b=3;c=4;
averageValue=AVE(a,b,c);
cout<<âaverageValue;â<<averageValue<<endl;
averageValue=AVE(a,b+1,c+2);
cout<<âaverageValue:â<<averageValue<<endl;
}
å
¶ä¸abc.hæ件çå
容å¦ä¸ï¼
double AVE(double x,double y,double z)
{
return (x+y+z)/3;
}
4ï¼ #include<iostream.h>
#includeâexample.hâ
void main()
{
int a,b,c;
cout<<â请è¾å
¥3个æ´æ°:â
cin>>a>>b>>c;
cout<<âæ大å¼:â<<max_value(a,b,c)<<endl;
cout<<âæå°å¼:â<<min_value(a,b,c)<<endl;
}
å
¶ä¸example.hæ件çå
容å¦ä¸:
int max_value(int a,int b,int c);
int min_value(int a,int b,int c);
è¿ä¸¤ä¸ªå½æ°çå®ä¹ï¼å称为å½æ°çå®ç°æå
·ä½å®ç°ï¼è¢«ä¿åå¨å¦ä¸ä¸ªç¨åºæ件ä¸ï¼å®å°è¢«ç¼è¯åè¿æ¥å°ä¸»æ件ä¸äº§çåºå¯æ§è¡æ件ã该ç¨åºæ件çå
容å¦ä¸ï¼
int max_value(int a,int b,int c)
{
if(a<b) a=b;//è¥aå°äºbåå°bçå¼èµç»a
if(a<c) a=c;//è¥aå°äºcåå°cçå¼èµç»a
return a;
}
int min_value(int a,int b,int c)
{
if(a>b) a=b;// è¥a大äºbåå°bçå¼èµç»a
if(a>c) a=c;// è¥a大äºcåå°cçå¼èµç»a
return a;
}
请读è
èªè¡åå®ç¨äºè¾å
¥ç3个æ´æ°ã
第äºç« æ°æ®ç±»åå表达å¼
ä¸ãç®çé¢
1ï¼ C++æ°æ®å为åªåç§å¤§çç±»åï¼å¨å¤§çæ´æ°ç±»åä¸åå为åªåç§ç±»åï¼
2ï¼ æ´æ°ç±»åå为åªä¸ç§ç±»åï¼æ¯ç§ç±»åçé¿åº¦åæ¯å¤å°ï¼
3ï¼ å®æ°ç±»åå为åªä¸ç§ç±»åï¼å®ä»¬çç±»åé¿åº¦åæ¯å¤å°ï¼
4ï¼ å精度åå精度åå«è¡¨ç¤ºå¤å°ä½æææ°åï¼
5ï¼ æ¯ä¸ç§C++å
·ä½ç±»åçå
³é®åæ¯ä»ä¹ï¼
6ï¼ åªåç§ä¿çåè½å¤ç¨æ¥ä¿®é¥°int ä¿çåæ为类åå
³é®åï¼åªä¸¤ç§ä¿çåè½å¤ç¨æ¥ä¿®é¥°charä¿çåæ为类åå
³é®åï¼
7ï¼ æ´å常æ°å
·æåªä¸ç§ä¸åè¿å¶ç表示ï¼å¦ä½åºåå®ä»¬ï¼
8ï¼ ä¸ä¸ªæ´æ°åç¼LæUåå«å
·æä»ä¹å«ä¹ï¼
9ï¼ è½¬ä¹å符åºåä¸çé¦å符æ¯ä»ä¹å符ï¼
10ï¼ å®æ°å
·æåªä¸¤ç§è¡¨ç¤ºæ¹æ³ï¼ä¸ä¸ªæµ®ç¹æ°å
·æé£äºæåï¼ä»ä¹å«è§æ ¼åæµ®ç¹æ°ï¼
11ï¼ å®ä¹ç¬¦å·å¸¸éååéçè¯å¥æä»ä¹å¼åï¼
12ï¼ #defineå½ä»¤çä½ç¨æ¯ä»ä¹ï¼
13ï¼ ä¸ä¸ªC++è¿ç®ç¬¦å
·æåªä¸ç§å±æ§ï¼
14ï¼ å·¦å¼åéå·¦å¼ï¼å称å³å¼ï¼æä»ä¹åºå«ï¼
15ï¼ å¨ç¨åºæ件ä¸ä½¿ç¨ç³»ç»æ°å¦å½æ°æéæºå½æ°æ¶ï¼åéè¦éè¿#includeå½ä»¤å¼å
¥åªä¸ªå¤´æ件ï¼
16ï¼ ä¸ä¸ªè¡¨è¾¾å¼æ¯å¦å¿
é¡»æä¸ä¸ªå¼ï¼å¨ä»ä¹æ
åµä¸å®æ²¡æå¼ï¼
17ï¼ æ§è¡ä¸ä¸ªå½æ°è°ç¨ç大è´è¿ç¨æ¯ä»ä¹ï¼å½æ°è¿ç®çä¼å
级å¦ä½ï¼
äºã填空é¢
1ï¼ æ°æ®ç±»åint,char,bool,float,doubleçç±»åé¿åº¦åå«ä¸º______ã______ã______ã______å______ã
2ï¼ çæ´åãæ´ååé¿æ´åçæç®å
³é®ååå«ä¸º______ã______å______ã
3ï¼ å¸¸æ°-4.205,1200å6.7E-9åå«å
·æ______ã______å______ä½æææ°åã
4ï¼ æ°å¼å¸¸é46ã0173å0x62对åºåè¿å¶å¼åå«ä¸º______ã______å______ã
5ï¼ å符常é âkâ,â\nâ,â\\â,â/052âåâ\xA2â对åºçæ°å¼åå«ä¸º______ã______ã______ã______å______ã
6ï¼ å符串âIt \âs\40an\40apple.\nâä¸å
å«æ______个å符ã
7ï¼ æ举类åä¸çæ¯ä¸ªæ举å¼é½æ¯ä¸ä¸ª______,å®çå¼æ¯ä¸ä¸ª______ï¼å¼çç±»å为______ã
8ï¼ å®æ°340.0å0.027E8对åºçè§æ ¼åæµ®ç¹æ°åå«ä¸º______å______ã
9ï¼ å¸¸æ°100ï¼-25ï¼3.62ï¼1E5å-4.73fçæ°æ®ç±»ååå«ä¸º______ã______ã______ã______å______ã
10ï¼ è¥xçå¼ä¸º10ï¼åx+=5çå¼åè¿ç®åç______çå¼ç¸åï¼çäº______ã
11ï¼ è¥x=5,y=10,å计ç®y*=++x表达å¼åï¼xåyçå¼åå«ä¸º______å______ã
12ï¼ è¥x=25,å计ç®yï¼x++表达å¼åï¼xåyçå¼åå«ä¸º______å______ã
13ï¼ åå®xåchåå«ä¸ºint ååcharåï¼åsizeof(x)åsizeof(ch)çå¼åå«ä¸º______å______ã
14ï¼ åå®x=64,y=88,åx<<2åy>>2çå¼åå«ä¸º______å______ã
15ï¼ åå®xæ¯ä¸ä¸ªé»è¾éï¼åx&&trueçå¼ä¸______çå¼ç¸åï¼x||falseçå¼ä¹ä¸______çå¼ç¸åã
16ï¼ åå®xæ¯ä¸ä¸ªé»è¾éï¼åx&&!xçå¼åå«ä¸º______å______ã
17ï¼ åå®x=10,å表达å¼x<=10?20:30çå¼ä¸º______ã
18ï¼ åå®x=10.5,y=-4.6,å表达å¼floorï¼fabs(x+y)ï¼çå¼ä¸º______ã
19ï¼ è¡¨è¾¾å¼sqrt(81)åpow(6,3)çå¼åå«ä¸º______å______ã
20ï¼ éæºå½æ°rand()%20çå¼å¨______è³______åºé´å
ã
21ï¼ æ°å¦ç®å¼(1+x)sin48°åaxbex+1对åºçç®æ¯è¡¨è¾¾å¼åå«ä¸º______å______ã
ä¸ãè¯æåºä¸åå表达å¼å¼çç±»å
åå®a为intåï¼x为doubleåï¼
1ï¼ 327
2ï¼ -1.5e6
3ï¼ 42.0f
4ï¼ 48L
5ï¼ 0372
6ï¼ 0xabc
7ï¼ 1/3
8ï¼ 1%3
9ï¼ 1.0%3
10ï¼ a*3/x
11ï¼ a*(a+x)
12ï¼ 1+a*a
13ï¼ a+=3
14ï¼ x*=2
15ï¼ âxâ
16ï¼ âxâ+20
17ï¼ true
18ï¼ ++a
19ï¼ short(a)
20ï¼ bool(x)
21ï¼ (unsigned int)(0256)
22ï¼ x=a++
23ï¼ sizeof(bool)
24ï¼ char(a+10)
25ï¼ abs(x)
26ï¼ fabs(a)
27ï¼ floor(x)
28ï¼ ceil(a)
29ï¼ exp(4)+2
30ï¼ rand()
31ï¼ rand()/100
32ï¼ floor(log(x))
33ï¼ pow(a,4)
34ï¼ a>10?x:sqrt(x)
35ï¼ a>100
36ï¼ x!=10
37ï¼ a&&x
38ï¼ a<1||a>10
39ï¼ !x
40ï¼ !(a==0)
åãè¯æ±åºä¸åæ¯ä¸ªè¡¨è¾¾å¼çå¼(å表达å¼äºä¸å½±å)
å·²ç¥a=20,x=4.7,r=âaâ,
1ï¼ a++
2ï¼ ++r
3ï¼ a%5
4ï¼ a/5
5ï¼ r%18
6ï¼ 1+a/3%4
7ï¼ a/8.0
8ï¼ r+=4
9ï¼ x=2*(x+5)-1
10ï¼ char(a+30)
11ï¼ 10*sizeof(int)
12ï¼ (a<<3)+5
13ï¼ a>0
14ï¼ a==1
15ï¼ a++&&r!=âaâ
16ï¼ ++a&&r==âaâ
17ï¼ a||x<=10
18ï¼ a==r||a==floor(x)
19ï¼ a=(r>âAâ?a+10:a-10)
20ï¼ a=(r<âAâ?a+10:a-10)
21ï¼ x=(a++,r++)
22ï¼ x=(a++,r++,50)
23ï¼ x=pow(3,5)
24ï¼ x=fabs(-26.5)+4
25ï¼ a=abs(a)%8-10
26ï¼ floor(x+0.5)
27ï¼ ceil(x-0.5)
28ï¼ ceil((x-=0.5)-0.5)
äºãæä¸åæ°å¦ç®å¼æä¸çå¼è¡¨ç¤ºæC++表达å¼
1ï¼ 2x(1+x2/3)
2ï¼ (1+ex)/(1-ex)
3ï¼ (-b+(b2-4ac)1/2)/2a
4ï¼ 1/(3xln(2x+k))
5ï¼ sin3(x+Ï/4)/(3+cos3(x-Ï/4))
6ï¼ 1/7(1+ex+1) n
7ï¼ 0<=x<=20
8ï¼ ax-by!=c
9ï¼ 4x+7y-2=3ab
10ï¼ |2x2+1|/|3x+2|<-5åæ¶3x+2!=0
11ï¼ age>=55æè
pay>=820
12ï¼ place=âæ±èâåæ¶sex=â女â
13ï¼ âaâ<=ch<=âzâæè
âAâ<=ch<=âZâ
14ï¼ s[0]ï¼â0âåæ¶ï¼s[1]=âxâæè
s[1]=âXâï¼
å
ãååºä¸åæ¯ä¸ªç¨åºè¿è¡åçè¾åºç»æ并èªè¡ä¸æºéªè¯
1. #include<iostream.h>
enum race{Black,White,Yellow};
void main()
{
race ra;
ra=Black;cout<<ra<<â,â;
ra=White;cout<<ra<<â,â;
ra=Yellow;cout<<ra<<â,â;
cout<<Black+White+Yellow<<endl;
}
2. #include<iostream.h>
#define PI 3.14159
const int R=10
void main()
{
double p,s;
p=2*R*PI;
cout<<âp=â<<p<<endl;
cout<<âs=â<<s<<endl;
}
3. #include<iostream.h>
void main()
{
int i=0,j=1,k;
k=i+=j;
cout<<i<<â â<<j<<â â<<k<<endl;
k=(i++)*(++j);
cout<<i<<â â<<j<<â â<<k<<endl;
k*=i++*j--;
cout<<i<<â â<<j<<â â<<k<<endl;
}
4. #include<iostream.h>
void main()
{
cout<<sizeof(bool)<<â â<<sizeof(char)<<â â;
cout<<sizeof(short)<<â â<<sizeof(int)<<â â;
cout<<sizeof(long)<<â â<<sizeof(float)<<â â;
cout<<sizeof(double)<<â â<<sizeof(long double)<<â â;
cout<<sizeof(int *)<<â â<<sizeof(double *)<<â â;
}
5. #include<iostream.h>
const int w=30;
void main()
{
int x,y;
x=w<<2;y=w>>2;
cout<<w<<â â<<x<<â â<<y<<endl;
x=w&10;y=w|10;
cout<<w<<â â<<x<<â â<<y<<endl;
x=w^10;y=-x&w;
cout<<w<<â â<<x<<â â<<y<<endl;
}
6. #include<iostream.h>
void main()
{
int x=10,y=-1;
cout<<((x>y)&&(y<0))<<â â;
cout<<((x>y)||(y<0))<<â â;
cout<<((x<=y)&&(y>=0))<<â â;
cout<<((x<=y)||(y>=0))<<â â;
cout<<((x==y)&&y)<<â â;
cout<<((x==y)||y)<<â â;
}
7. #include<iostream.h>
void main()
{
int x=5,y=10,k;
(k=x)+=y;cout<<x<<â â<<y<<â â<<k<<endl;
k=x+=y;cout<<x<<â â<<y<<â â<<k<<endl;
k=x*=y;cout<<x<<â â<<y<<â â<<k<<endl;
k=(x++,y++);cout<<x<<â â<<y<<â â<<k<<endl;
k=x++,y++;
cout<<x<<â â<<y<<â â<<k<<endl;
}
8. #include<iostream.h>
#include<math.h>
void main()
{
double x=15.72;
double y,z;
y=ceil(x);z=floor(x);
cout<<x<<â â<<y<<â â<<z<<endl;
y=floor(x+0.5);z=floor(x*10+0.5)/10;
cout<<x<<â â<<y<<â â<<z<<endl;
y=ceil(x-0.5);z=ceil(x*10-0.5)/10;
cout<<x<<â â<<y<<â â<<z<<endl;
}
ä¸ãç¼åä¸åç¨åº
1ï¼ å·²ç¥ä¸ä¸ªä¸è§å½¢ä¸ä¸æ¡è¾¹çé¿åº¦åå«ä¸ºa,båcï¼å©ç¨è®¡ç®å
¬å¼(s(s-a)(s-b)(s-c))1/2 æ±åºä¸è§å½¢çé¢ç§¯ï¼å
¶ä¸s=(a+b+c)/2,åå®a,båcçå¼ç±é®çè¾å
¥ï¼å¹¶ç¡®ä¿ä»»ä½ä¸¤è¾¹çé¿åº¦å¤§äºç¬¬ä¸æ¡è¾¹ã
2ï¼ åå®ä¸æ大å¦2001å¹´æç人æ°ä¸º3000人ï¼è¥ä»¥åæ¯å¹´å¹³åæ¯ä¸ä¸å¹´è®¡åæ©æ10ï¼
ï¼å2006å¹´å°è®¡åæçå¤å°äººï¼
3ï¼ å·²ç¥æ4个æ´æ°ä¸ºa,b,c,d,è¯è®¡ç®åºå®ä»¬çç®æ¯å¹³åå¼åå ä½å¹³åå¼ã
4ï¼ å·²ç¥x=2a/2(a+b)sina,y=2b/3(a+b)cosb,è¯æ ¹æ®ä»é®çä¸è¾å
¥çaåbçå¼åå«è®¡ç®åºxåyçå¼ã
å
«ãä¸æºå®éªé¢
1. 让计ç®æºéæºåº10é两ä½æ´æ°å æ³é¢ä¾ç¨æ·è®¡ç®ï¼æ¯éé¢10åï¼è®¡ç®å®æåæå°åºå¾åã
#include<iostream.h>
#include<stdlib.h>
#include<time.h>
const N=10;
void main()
{
srand(time(0));
int x,y,z,c=0;
for(int I=1;I<=N;I++)
{
x=rand()%90+10;
y=rand()%90+10;
cout<<x<<â+â<<y<<â=â;
cin>>z;
if(x+y==z)c++;
}
cout<<âå¾å:â<<c*10<<endl;
}
2. æå°åº0°ï¼90°ä¹é´æ¯é5°çæ£å¼¦å¼åä½å¼¦å¼ã
#include<iomanip.h>
#include<math.h>
const double RAD=3.14159/180;
void main()
{
int I=0;
while(I<=90)
{
cout<<setw(5)<<I<<setw(10)<<sin(I*RAD)<<â â;
//setw(n)使åé¢ä¸ä¸ªæ°æ®çè¾å
¥å®½åº¦ä¸ºn,
//å®å¨iomanip.h头æ件ä¸æå®ä¹
cout<<setw(10)<<cos(I*RAD)<<endl;
I+=5;
}
}
3. æä»é®çä¸è¾å
¥çä¸ä¸ªæ£æ´æ°ææ°åä½çç¸å次åºè¾åºã
#include<iostream.h>
void main()
{
int num,rem;
cout>>num;
do{
rem=num%10;
num/=10;
cout<<rem;
}while(num>0);
cout<<endl;
}
4. æå°åºa-fä¸æ¯ä¸ªå¤§å°ååæ¯æ对åºçASCIIç ã
#include<iostream.h>
void main()
{
char c1=âAâ,c2=âaâ;
for(int I=1;I<=6;I++)
{
cout<<c1<<â:â<<int(c1)<<â,â;
cout<<c2<<â:â<<int(c2)<<endl;
c1++;c2++;
}
}
5. ä»é®çä¸è¾å
¥ä¸¤ä¸ªæ´æ°ï¼ç±ç¨æ·åçä»ä»¬çåãå·®ãä¹ååä½è¿ç®çç»æï¼å¹¶ç»è®¡åºæ£ç¡®çæ¡ç个æ°ã
#include<iostream.h>
void main()
{
int x,y,z,c=0;
cout<<âè¾å
¥ä¸¤ä¸ªæ´æ°ï¼â;
cin>>x>>y;
cout<<x<<â+â<<y<<â=â;
cin>>z;if(x+y==z) c++;
cout<<x<<â-â<<y<<â=â;
cin>>z;if(x-y==z) c++;
cout<<x<<â*â<<y<<â=â;
cin>>z;if(x*y==z) c++;
cout<<x<<â/â<<y<<â=â;
cin>>z;if(x/y==z) c++;
cout<<x<<â%â<<y<<â=â;
cin>>z;if(x%y==z) c++;
cout<<âç对â<<c<<âéé¢â<<endl;
温馨提示:内容为网友见解,仅供参考