classCishu{publicstaticvoidGetnum(){string str="The quick brown fox jumped over the lazy dog keeps the doctor away.Can a fox and a dog be friends?";string key="the";int count=0;for(int i =0; i < str.Length - key.Length; i++){if(str.Substring(i, key.Length)== key){
count++;}}
Console.WriteLine(key +"在"+str+"中出现"+ count+"次");}}
classHuanyuan{publicstaticvoidHuan(){for(int i =100; i <=999; i++){int j = i *100+95;if(j%57==0&& j %67==0){
Console.WriteLine(j);}}}}
求圆的周长,面积,体积
classMyMath{publicstaticvoidPerimeter(double R){double c =2* Math.PI * R;
Console.WriteLine(c);}publicstaticvoidArea(double R){double s = Math.PI * R * R;
Console.WriteLine(s);}publicstaticvoidVoiume(double R){double v=(3/4)*Math.PI*R*R*R;
Console.WriteLine(v);}
百钱百鸡
classMaiji{publicstaticvoidBuy(){for(int i =0; i <20; i++){for(int j =0; j <33; j++){if((100- i - j)%3==0&& i *5+ j *3+(100- i - j)/3==100){
Console.WriteLine("{0},{1},{2}", i, j,100- i - j);}}}}}