久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放AV片

<center id="vfaef"><input id="vfaef"><table id="vfaef"></table></input></center>

    <p id="vfaef"><kbd id="vfaef"></kbd></p>

    
    
    <pre id="vfaef"><u id="vfaef"></u></pre>

      <thead id="vfaef"><input id="vfaef"></input></thead>

    1. 站長(zhǎng)資訊網(wǎng)
      最全最豐富的資訊網(wǎng)站

      C語(yǔ)言學(xué)習(xí)要領(lǐng)

      1、計(jì)算機(jī)語(yǔ)言挺枯燥的,如何提起興趣 
      答:首先要明確學(xué)習(xí)的目標(biāo),沒有明確的學(xué)習(xí)目標(biāo)就沒有學(xué)習(xí)動(dòng)力。給自己定一個(gè)目標(biāo),比如這次一定通過(guò)計(jì)算機(jī)等級(jí)考試,或者這個(gè)月學(xué)習(xí)完做個(gè)東西出來(lái)等等。其次,確定了目標(biāo)之后,要認(rèn)真去做,多上機(jī)操作實(shí)踐,遇到不懂的要多跟教師和其他學(xué)員交流,千萬(wàn)不能放棄。當(dāng)自己編的一段小程序運(yùn)行通過(guò),或攻下一道難題,自己就會(huì)獲得一種成就感,可能還會(huì)很興奮,也就漸漸有了興趣。最后,要把所學(xué)的知識(shí)運(yùn)用到實(shí)際問題當(dāng)中,這樣既可以鞏固所學(xué)的知識(shí),不至于完學(xué)了就忘,還可以根據(jù)實(shí)際需要拓展知識(shí)面。這樣良性循環(huán),興趣也會(huì)越來(lái)越濃。 

      2、有學(xué)員來(lái)信問到:我的電腦里安裝的TURBO?C(970K)不能正常的編譯,現(xiàn)象是:在編譯過(guò)程中,提示沒有錯(cuò)誤也沒有警告,按任意鍵返回,可是在電腦上不能生成”OBJ”文件,有時(shí)提示:Unable to open input file’cos.obj’,我的朋友從他們學(xué)校的PC上拷貝回來(lái)的程序也出現(xiàn)這個(gè)問題?!在他們學(xué)校卻很正常,這是怎么回事?這個(gè)問題一直在困擾我,使我的學(xué)習(xí)不能進(jìn)行下去!請(qǐng)幫我解決。謝謝!
      答:這需要重新設(shè)置options–directories中的include目錄和lib目錄,設(shè)為你C的安裝目錄就可以了。記住要保存喲!
      3、#include
      main()
      {int m=7,n=4;
      float a=38.4,b=6.4,x;
      x=m/2+n*a/b+1/2;
      printf(“%fn”,x);
      }
      這個(gè)程序的結(jié)果是27.000000
      為什么我一直算的是28.000000呢?請(qǐng)指教 
      答:main()

      int m=7,n=4;
      float a=38.4,b=6.4,x;
      x=m/2+n*a/b+1/2;
      printf(“%fn”,x);
      }
      m/2==3;因?yàn)閙是整形所以結(jié)果為整形不是3.5而是3
      同樣1/2不是0.5而是0。
      要改的話,x=(float)m/2+n*a/b+1.0/2.0; 
      結(jié)果為28.0000

      4、有些人說(shuō)我的程序很難讓人看懂,請(qǐng)問如何將程序?qū)懙靡?guī)范、簡(jiǎn)潔明了
      答:這是編程中重要的一點(diǎn),要養(yǎng)成良好的編程習(xí)慣。請(qǐng)看一個(gè)例題:程序很簡(jiǎn)單,是用TURBO C編一個(gè)時(shí)鐘程序。具體如下:
      /**************************************************** 
      Module:clock.c
      just a test of my programming ability 
      *****************************************************/
      #include”math.h”
      #include”dos.h”
      #include”stdio.h”
      #include”graphics.h”
      main()
      {
      char s[30];
      int gdriver,gmode;
      int cosh,sinh,cosm,sinm,coss,sins;
      struct ;time t;
      char keydown=0;
      int x=300,y=160,r=40;
      clrscr();
      gdriver=9; gmode=1;
      initgraph(&gdriver,&gmode,”a:\”);/*需要說(shuō)明的是,第三個(gè)參數(shù)a:\是egavga.bgi這個(gè)文件的路徑*/

      /* install the graphic device.the third parameter is the path of the driver*/

      setbkcolor(0);
      setcolor(WHITE);
      while(1)
      {

      circle(x,y,r);/*paintthecircle*/

      line(x,y+r-10,x,y+r-12);
      line(x+r-4,y,x+r,y);
      line(x-r,y,x-r+4,y);
      line(x,y-r+10,x,y-r+10+2); /* draw the fout scales */

      gettime(&t);
      sprintf(s,”The current time is %2d:%02d:%02dn”,t.ti_hour,t.ti_min,t.ti_sec,t);
      outtextxy(0,0,s); /* out put the current time */
      outtextxy(0,10,”This clock is written by lijun”); /*?show the auther */
      coss=(int)((r-10)*cos(t.ti_sec*3.14f/30-3.14f/2)+x);
      sins=(int)((r-10)*sin(t.ti_sec*3.14f/30-3.14f/2)+y);
      cosm=(int)((r-19)*cos(t.ti_min*3.14f/30-3.14f/2)+x);
      sinm=(int)((r-19)*sin(t.ti_min*3.14f/30-3.14f/2)+y);
      cosh=(int)((r-28)*cos((t.ti_hour+(float)(t.ti_min)/60)*3.14f/6-3.14f/2)+x);
      sinh=(int)((r-28)*sin((t.ti_hour+(float)(t.ti_min)/60)*3.14f/6-3.14f/2)+y);

      /* calculate the position of the three points */
      setcolor(14);
      line(x,y,coss,sins);
      setcolor(13);
      line(x,y,cosm,sinm);
      setcolor(10);
      line(x,y,cosh,sinh);
      setcolor(15);

      /* draw the points */

      sleep(1);
      clrscr();&nb

      sp; 
      keydown=kbhit();/* check whether key down */
      if(keydown)
      {
      closegraph();/* close graphic device */
      exit(0);
      }
      }

      }

      贊(0)
      分享到: 更多 (0)
      網(wǎng)站地圖   滬ICP備18035694號(hào)-2    滬公網(wǎng)安備31011702889846號(hào)