亚洲喷奶水中文字幕电影,日本aⅴ高清一区二区三区,欧美亚洲日本国产,欧美日韩亚洲中文字幕

<legend id="flx4p"><abbr id="flx4p"><thead id="flx4p"></thead></abbr></legend>

<mark id="flx4p"><thead id="flx4p"></thead></mark>

      我要投稿 投訴建議

      計(jì)算機(jī)三級上機(jī)題庫練習(xí)及答案(4)

      時(shí)間:2021-01-13 17:27:07 計(jì)算機(jī)等級 我要投稿

      2006年計(jì)算機(jī)三級上機(jī)題庫練習(xí)及答案(4)

      內(nèi)容簡介:


      第7題
      下列程序的功能是:在三位整數(shù)(100至999)中尋找符合條件的整數(shù)并依次從小到大存入數(shù)組中;該整數(shù)既是完全平方數(shù),又有兩個(gè)數(shù)字相同,例如144、676等。
      請編制函數(shù)jsValue()實(shí)現(xiàn)此功能,滿足該條件的整數(shù)的'個(gè)數(shù)是通過所編制的函數(shù)返回。
      最后調(diào)用函數(shù)writeDat()把結(jié)果輸出到文件out7.dat中。
      請勿改動主函數(shù)main()和寫函數(shù)writeDat的內(nèi)容。

      #include
      jsValue(int bb[])
      {
      }
      main()
      {
      int b[20],num;
      num=jsValue(b);
      writeDat(num,b);
      clrscr();
      }
      writeDat(int num,int b[])
      {
      FILE *out;
      int i;
      out=fopen("out7.dat","w");
      printf("%dn",num);
      fprintf(out,"%dn",num);
      for(i=0;i{printf("%dn",b[i]);
      fprintf(out,"%dn",b[i]);}
      fclose(out);
      }
      【答案】
      jsValue(int bb[])
      {
      int i,j,k=0;
      int hun,ten,data;
      for(i=100;i<=999;i++)
      {
      j=10;
      while(j*j<=i)
      {
      if(i==j*j)
      {
      hun=i/100;data=i-hun*100;
      ten=data/10;data=data-ten*10;
      if(hun==ten||hun==data||ten==data)
      {bb[k]=i;k++;}
      }
      j++;
      }
      }
      return k;
      }http://www.jzcjspjx.com/

      【計(jì)算機(jī)三級上機(jī)題庫練習(xí)及答案(4)】相關(guān)文章:

      2006年計(jì)算機(jī)三級上機(jī)題庫練習(xí)及答案(1)10-09

      2006年計(jì)算機(jī)三級上機(jī)題庫練習(xí)及答案(2)10-09

      2006年計(jì)算機(jī)三級上機(jī)題庫練習(xí)及答案(3)10-09

      2006年計(jì)算機(jī)等級考試三級上機(jī)題庫練習(xí)及答案(7)10-09

      2006年計(jì)算機(jī)等級考試三級上機(jī)題庫練習(xí)及答案(6)10-09

      2006年計(jì)算機(jī)等級考試三級上機(jī)題庫練習(xí)及答案(5)10-09

      2005年計(jì)算機(jī)等級考試三級上機(jī)題庫(七)10-09

      2005年計(jì)算機(jī)等級考試三級上機(jī)題庫(六)10-09

      2005年計(jì)算機(jī)等級考試三級上機(jī)題庫(九)10-09