欧美色欧美亚洲高清在线观看,国产特黄特色a级在线视频,国产一区视频一区欧美,亚洲成a 人在线观看中文

  1. <ul id="fwlom"></ul>

    <object id="fwlom"></object>

    <span id="fwlom"></span><dfn id="fwlom"></dfn>

      <object id="fwlom"></object>

      西北農(nóng)林科技大學(xué) c語言上機(jī) 實(shí)習(xí)6答案

      時(shí)間:2019-05-12 14:18:53下載本文作者:會員上傳
      簡介:寫寫幫文庫小編為你整理了多篇相關(guān)的《西北農(nóng)林科技大學(xué) c語言上機(jī) 實(shí)習(xí)6答案》,但愿對你工作學(xué)習(xí)有幫助,當(dāng)然你在寫寫幫文庫還可以找到更多《西北農(nóng)林科技大學(xué) c語言上機(jī) 實(shí)習(xí)6答案》。

      第一篇:西北農(nóng)林科技大學(xué) c語言上機(jī) 實(shí)習(xí)6答案

      實(shí)習(xí)六答案

      1、整數(shù)交換函數(shù)設(shè)計(jì)

      /* exer 6-1 交換2個(gè)整數(shù) */ #include

      void swap(int *, int *);

      /* 函數(shù)聲明 */

      void main(void){

      int a,b;

      //printf(“please enter 2 data:”);

      scanf(“%d%d”,&a,&b);

      /* 輸入2個(gè)整數(shù) */

      //printf(“a=%d,b=%dn”,a,b);

      swap(&a,&b);

      /* 調(diào)用函數(shù)進(jìn)行交換 */

      printf(“%d %dn”,a,b);}

      void swap(int *p1, int *p2)

      /* 交換函數(shù) */ {

      int temp;

      temp = *p2;

      /* 交換 */

      *p2 = *p1;

      *p1 = temp;}

      2、數(shù)字字符個(gè)數(shù)統(tǒng)計(jì)函數(shù)設(shè)計(jì)

      /* exer 6-2 統(tǒng)計(jì)一串字符中數(shù)字字符的個(gè)數(shù) */ #include int count(char *);

      /* 函數(shù)聲明 */ void main(void){

      char pstr[80];

      //printf(“please enter string:”);

      gets(pstr);

      /* 輸入字符串 */

      printf(“%dn”,count(pstr));/* 調(diào)用函數(shù)進(jìn)行統(tǒng)計(jì) */ }

      int count(char *p)

      /* 統(tǒng)計(jì)函數(shù) */ {

      int num=0;

      while(*p!='