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B
$B%P%C%F%j$N=u67(B
$B2hLL1&2<$N%P%C%F%j$N%^!<%/$r1&%/%j%C%/$7!"%W%m%Q%F%#$rA*$V!#(B

$Br7o$rFI$s$GEz$($J$5$$!#(B

  1. $B%N!<%H%Q%=%3%s$NB_$7Windows $B$N(B CD-ROM $B$NB_$7Windows $B$N%=%U%H%&%'%"$N3+H/(B
  2. Windows $B$NFbIt2r@O(B
  3. Windows $B$N%P%C%/%"%C%W(B

$BMWE@(B

$BCx:n8"K!$OCx:n

$BEz(B

  1. $B%N!<%H%Q%=%3%s$NB_$7 $B%=%U%H%&%'%"$NB_$7C5n$7$?>uBV$G$N$_B_M?2DG=!#(B
  2. Windows $B$N(B CD-ROM $B$NB_$7 $B>e5-9`L\$HF1MM$KB_M?$G$-$J$$!#(B
  3. Windows $B$N%=%U%H%&%'%"$N3+H/(B
    $BFC$K5,Dj$5$l$F$J$$$N$G<+M3$K9T$C$FNI$$!#(B
  4. Windows $B$NFbIt2r@O(B
    $B!V%j%P!<%9%(%s%8%K%"%j%s%0!"5U%3%s%Q%$%k!"5U%"%;%s%V%k$N@)8B!W$H$$$&9`L\$,;HMQ5vBz>r7o$K$"$k$N$G!"IT2D(B
  5. Windows $B$N%P%C%/%"%C%W(B
    $B;HMQ5vBz>r7o$K$h$j!"0lIt$N$_:[email protected]=!#(B($B%P%C%/%"%C%W$,GKB;$9$k$3$H$J$I$r9M$($k$HITEv$J@)8B$K;W$($k(B)

$B%O!<%I%G%#%9%/$NFbMF$,A4$F>C$($?$H$-!"=$I|$9$kJ}K!$r=q$-$J$5$$!#(B

$B2rEz(B

$B%j%+%P%j%G%#%9%/$rF~$l!"EE8;$rF~$l!"2hLL$N;X<($K=>$&!#(B

2. $BBh;02s(B

[$B1i=,(B] MS-DOS $B%W%m%s%W%H$r;HMQ$7$F$_$k(B

MS-DOS $B%W%m%s%W%H$G

$B2rEz(B

  1. cd
    \Windows $B$,I=<($5$l$k!#(B
  2. rem abc
    $B2?$bI=<($5$l$J$$!#(B
  3. echo abc
    abc $B$,I=<($5$l$k!#(B
  4. cd \windows
    \windows $B$,I=<($5$l$k!#(B
  5. type licence.txt
    $B;HMQ5vBz>r7o$,I=<($5$l$k!#(B
  6. sol
    ($B%$%s%9%H!<%k$5$l$F$$$l$P(B)$B%=%j%F%#%"$H$$$&%2!<%`$,F0$/(B
  7. exit
    MS-DOS $B%W%m%s%W%H$,>C$($k!#(B

[$B1i=,(B] $B
figure of exercise

$BEz(B

  1. mkdir \d
  2. mkdir \d\e
  3. mkdir \d\f
  4. mkdir \d\e\g
  5. mkdir \d\e\h

3. $BBh;M2s(B

$B%o!<%I$N1i=,(B

($BN,(B)

$B!V%-!<%\!<%I$d%^%&%9$KBe$k

$BMWE@(B

$BF~NO$N0U5A$r9M$(!"E,@Z$JF~NOJ}<0$rDs0F$9$k!#(B $B!V;O$a$KF~NOJ}<0$"$j$-!WE*$J=q$-J}$O@bF@NO$,Gv$$!#(B (1)$B8=>uJ,@O(B(2)$BI,MW$JF~NOFbMF(B(3)$B$=$l$KE,$7$?J}<0$NDs0F$N=g$K=q$/$HNI$$!#(B ($B$3$N$h$&$K!"5;=QE*$JJ8>O$OLdBjE@$r5s$2$F2r7h$7$F$$$/J}?K$G=q$/$HNI$$(B)

$B2rEzNc(B

$B8=:_!"%3%s%T%e!<%?$NF~NOJ}<0$H$7$FBeI=E*$J$b$N$O!"%-!<%\!<%I$H%^%&%9$G$"$k!#(B $B$3$3$G$O$=$l$KBe$k

$B$^$:!"8=>u$K$D$$$F9M$($k!#(B $B8=:_!"%-!<%\!<%I$H%^%&%9$,;H$o$l$F$$$k$,!"$=$NMQES$O!"%-!<%\!<%I$OO$NF~NO$K!"%^%&%9$O0LCV$N;X<($K;H$o$l$F$$$k!#(B $B$D$^$j!"8=>u$N%3%s%T%e!<%?$NF~NO$O!"J8>O$NF~NO$H!"0LCV$N;X<($NFs$l!"%-!<%\!<%I$H%^%&%9$,J,C4$7$F$$$k$H$$$&7ABV$K$J$C$F$$$k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!#(B
  3. $B%a!<%k%=%U%H$G!"!VJT=8"*E=$jIU$1!W$G%W%m%0%i%`$rE=$jIU$1$k!#(B

Excel $B$N1i=,(B

$B>JN,(B

5. $BBhO;2s(B

$B1i=,(B1

  1. $B9b9;$N8eGZ$KBP$7$F!"!VBg3X$K9g3J$9$k$K$O$I$&$9$l$P$h$$$+(B?$B!W(B $B=q$-$J$5$$!#(B
  2. $B>e5-$r=q$$$?;~$K!"FI$_0W$/$9$k$?$a$K5$$rIU$1$?!"J8>[email protected]}(B $BK!$r=q$-=P$7$J$5$$!#(B

$BMWE@(B

$B$5$^$6$^$JMW0x$r@0M}$7$F4J7i$K=q$/$N$,L\E*$J$N$G!"2U>r=q$-$J$I$rMxMQ$9$k!#(B

$B2rEzNc(B

$BBg3X$K9g3J$9$k$K$O!D!D(B
$B;vL3E*$J
  1. $B$B6&DL%F%9%H$N$BFs
    $B3X=,$9$k>e$G$NCm0UE@(B
    1. $BITF@0U2JL\$N3XNO$r?-$P$9$3$H$r$BF@0U2JL\$O%_%9$r$7$J$$$h$&$J9)IW$r$9$k!#(B
    2. $BDj4|E*$KLO5<;n83$r9;$,E,@Z$+$I$&$+%A%'%C%/$9$k!#(B
    $B9)IW$7$?$3$H(B
    1. $B;vL3E*$JFbMF$H3X=,>e$NFbMF$rJ,$1!"$=$l$>$l2U>r=q$-$K$7$?!#(B
    2. $BMM!9$JMW0x$,9M$($i$l$k$,!"$=$l$>$l;09`L\$K9J$C$?!#(B

    $B1i=,(B2

    $B

    /* This program prints "Hello World!". */
    #include <stdio.h>
    main(){
      printf("Hello World!\n");
    }
    

    $B2rEz(B

    $B2hLL$K!V(BHello World!$B!W$,=q$+$l$k!#(B

    $B1i=,(B4

    $B$3$N%W%m%0%i%`$r2~B$$7$F!"!V(BHello New World!$B!W$r2hLL$K=P$7$J$5$$!#(B

    $B2rEz(B

    #include <stdio.h>
    main(){
      printf("Hello New World!\n");
    }
    

    $B1i=,(B5

    $B

    $B2rEz(B

    $B$3$l$O!"Fs

     2.000000 x^2 + 3.000000 x + 1.000000 = 0
    root1= -0.500000, root2= -1.000000
    
    $BC"$7!"$3$N%W%m%0%i%`$O!" zitsubu= -b/2/a; kyobu = sqrt(d)/2/a; $B$3$l$O zitsubu= -b/2/a; kyobu = sqrt(-d)/2/a;

    ($BB>$N1i=,$O>JN,(B)

    6. $BBh<72s(B

    $BNcBj(B

    1. $B$B
      #include <stdio.h>
      main(){
         int i;
         float a;
         i=1;
         i=i+1;
         a=0.314E1;
         printf("%d %f\n",i,a);
      }
      

      $B2rEz(B

      2 3.140000
      

      $B1i=,(B

      1. $BFs85O"N)0l a x + b y = e c x + d y = f
      2. C $B8@8l$GFs85O"N)0l

        $B2rEz(B

          1. det = ad - bc$B$H$9$k!#(B
          2. det$B$,(B 0 $B$G$J$$$H$-!"(B x, y $B$O $B(#(Bx$B($(B 1 $B(#(B d -b $B($(#(B e $B($(B $B("(B $B("(B = --- $B("(B $B("("(B $B("(B $B(&(By$B(%(B det $B(&(B -c a $B(%(&(B f $B(%(B $B=>$C$F!"(B x=(de-bf)/det, y=(-ce+af)/det $B$G$"$k!#(B
          3. det $B$,(B 0 $B$N;~(B: a:b:e=c:d:f $B$J$i$P(B ax+by=e $B$rK~$?$9A4$F$N(B x, y$B!"$=$&$G$J$1(B $B$l$P2rL5$7!#(B $B$J$*!"(Ba:b:e=c:d:f $B$O(B C $B8@8l$G$OH=Dj$G$-$J$$!#(B a:b=c:d $B$O!"(Bad-bc=0 $B$O4{$K$o$+$C$F$$$k$N$G!"(B a:e=c:f $B$rH=Dj$9$l$PNI$$!#(B $B$D$^$j!"(Baf $B$H(B ce $B$,Ey$7$$$+$I$&$+$rH=Dj$9$l$PNI$$!#(B
        1. $B%W%m%0%i%`$O #include <stdio.h> main(){ float a,b,c,d,e,f,x,y; float det; a=1.0; b=2.0; c=3.0; d=4.0; e=5.0; f=6.0; det = a * d - b * c; if(det==0){ if(a*f==c*e){ printf("%f x + %f y = %f $B$rK~$9A4$F$N(B x, y\n",a,b,e); }else{ printf("$B2r$J$7(B\n"); } }else{ x=(d*e-b*f)/det; y=(-c*e+a*f)/det; printf("x = %f, y = %f\n",x,y); } }

        7. $BBhH,2s(B

        $B1i=,(B8-1

        $B

        int a[10]={4,5,3,1,7,8,9,2,0,6};
        

        $B2rEz(B

        #include <stdio.h>
        main()
        {
          int a[10]={4,5,3,1,7,8,9,2,0,6};
          int i,sum;
          float heikin;
          sum=0;
          i=0;
          while(i<10){
            sum=sum+a[i];
            i=i+1;
          }
          heikin=sum/10.0;
          printf("%x\n",heikin);
        }
        

        $B1i=,(B8-2

        for $BJ8$r;HMQ$7$F!"J?6Q$r5a$a$k%W%m%0%i%`$r=q$1(B

        $B2rEz(B

        #include <stdio.h>
        main()
        {
          int a[10]={4,5,3,1,7,8,9,2,0,6};
          int i,sum;
          float heikin;
          sum=0;
          for(i=0;i<10;i++){
            sum+=a[i];
          }
          heikin=sum/10.0;
          printf("%d\n",heikin);
        }
        

        $B1i=,(B8-3

        1 $B$+$i(B 100 $B$^$G$N?t$r2hLL$KI=<($9$k%W%m%0%i%`$r=q$1(B

        $B2rEz(B

        #include <stdio.h>
        main()
        {
          int i;
          for(i=1;i<=100;i++){
            printf("%d\n",i);
          }
        }
        

        $B1i=,(B8-4

        $BI8=`JP:9$r5a$a$k%W%m%0%i%`$r=q$1(B

        • $BI8=`JP:9(B=$B"eJ,;6(B
        • $BJ,;6(B=($B&2(B($BCM(B - $BJ?6Q(B)$B$NFs>h(B)/$BA4BN$N?t(B
          ($B@5$NJ?J}:,$O(B sqrt() $B$K$h$j7W;;$G$-$k(B)

        $B2rEz(B

        #include <stdio.h>
        main()
        {
          int a[10]={4,5,3,1,7,8,9,2,0,6};
          int i,sum,dsum;
          float heikin,bunsan,hyouzyunhensa
          sum=0;
          dsum=0;
          for(i=0;i<10;i++){
            sum+=a[i];
            dsum+=a[i]*a[i];
          }
          heikin=sum/10.0;
          bunsan=dsum/10.0-heikin*heikin;
          hyouzyunhensa=sqrt(bunsan);
          printf("%f\n",hyouzyunhensa);
        }
        

        $B1i=,(B8-5

        $BE@?t$,G[Ns$KF~$C$F$$$k;~!"JP:9CM$r0u:~$9$k%W%m%0%i%`$r=q$1(B

        $BJP:9CM(B = ($BCM(B-$BJ?6Q(B)*10/$BI8=`JP:9(B + 50
        

        $B2rEz(B

        #include <stdio.h>
        main()
        {
          int a[10]={4,5,3,1,7,8,9,2,0,6};
          int i,sum,dsum,hensachi;
          float heikin,bunsan,hyouzyunhensa,
          sum=0;
          dsum=0;
          for(i=0;i<10;i++){
            sum+=a[i];
            dsum+=a[i]*a[i];
          }
          heikin=sum/10.0;
          bunsan=dsum/10.0-heikin*heikin;
          hyouzyunhensa=sqrt(bunsan);
          for(i=0;i<10;i++){
            hensachi=(a[i]-heikin)*10.0/hyouzyunhensa+50;
            printf("$BE@?t(B: %d  $BJP:9CM(B:%d\n",a[i],hensachi);
          }
        }
        

        $B1i=,(B8-6

        $BJ8;zNs$N@hF,$K6uGr$,$$$/$D$"$k$+$r?t$($k%W%m%0%i%`$r=q$1(B

        $B2rEz(B

        #include <stdio.h>
        main(){
          int i,num;
          char a[]="    This   is a   sample sentence.";
          printf("%s\n",a);
          i=0;
          while(a[i]==' '){
            i=i+1;
          }
          printf("There are %d spaces in front of the string.\n",i);
        }
        

        $B1i=,(B8-7

        $BJ8;zNs$KC18l$,$$$/$D$"$k$+$r?t$($k%W%m%0%i%`$r=q$1(B

        $B2rEz(B

        #include <stdio.h>
        main(){
          int i,num;
          char privious;
          char a[]="    This   is a   sample sentence.";
          printf("%s\n",a);
          i=0;
          num=0;
          privious=' ';
          while(a[i]!='\0'){
            if(privious==' '){
              if(a[i]!=' '){num=num+1;}
            }
            privious=a[i];
            i=i+1;
          }
          printf("This string has %d words.\n",num);
        }
        

        8. $BBh6e2s(B

        $B1i=,(B9-1

        $B2hLL$K(B abcdefg $B$r0u:~$9$k%W%m%0%i%`$r=q$1(B

        $B2rEz(B

        #include <stdio.h>
        main(){
          printf("abcdefg\n");
        }
        

        $B1i=,(B9-2

        $B@0?t7?JQ?t(Bi$B$O

        int i=23;
        

        $B2hLL$K(Bi$B$NFbMF$rI=<($9$k%W%m%0%i%`$r=q$1!#(B $BC"$7!"=PNO$O$^$7$$!#(B

        $B2rEz(B

        The value of i is 23.
        
        #include <stdio.h>
        main(){
          int i=23;
          printf("The value of i is %d.\n",i);
        }
        

        $B1i=,(B9-3

        $BIbF0>.?tE@7?JQ?t(Bx$B$O

        float x=0.314E1;
        

        $B2hLL$K(Bx$B$NFbMF$rI=<($9$k%W%m%0%i%`$r=q$1!#(B $BC"$7!"=PNO$O$^$7$$!#(B

        $BJQ?t(B x $B$NCM$O(B 3.14000.
        

        $B2rEz(B

        #include <stdio.h>
        main(){
          float x=0.314E1;
          printf("$BJQ?t(B x $B$NCM$O(B %f.\n",x);
        }
        

        $B1i=,(B9-4

        $BJ8;z7?JQ?t(Bc$B$O

        char c='a';
        

        $B2hLL$K(Bc$B$NFbMF$rI=<($9$k%W%m%0%i%`$r=q$1!#(B $BC"$7!"=PNO$O$^$7$$!#(B

        $BJ8;zJQ?t(B c $B$NCM$O(B 'a' $B$G$"$k!#(B
        

        $B2rEz(B

        #include <stdio.h>
        main(){
          char c='a';
          printf("$BJ8;zJQ?t(B c $B$NCM$O(B '%c' $B$G$"$k!#(B",c);
        }
        

        $B1i=,(B9-5

        $BJ8;z7?$NG[NsJQ?t(Bs$B$O

        char s[]="abcdefg";
        

        $B2hLL$K(Bs$B$NFbMF$rI=<($9$k%W%m%0%i%`$r=q$1!#(B $BC"$7!"=PNO$O$^$7$$!#(B

        $BG[NsJQ?t(B s $B$OJ8;zNs$H$7$F(B abcdefg $B$H$$$&CM$r;}$D!#(B
        

        $B2rEz(B

        #include <stdio.h>
        main(){
          char s[]="abcdefg";
          printf("$BG[NsJQ?t(B s $B$OJ8;zNs$H$7$F(B %s $B$H$$$&CM$r;}$D!#(B",s);
        }
        

        $B1i=,(B9-6

        $BJQ?t(Bi $B$NCM$,(B 0 $B$h$jBg$-$+$C$?$i2hLL$K!V@5$NCM!W!"(B0 $B$h$j>.(B $B$5$+$C$?(B $B$i2hLL$K!VIi$NCM!W!"(B 0 $B$@$C$?$i!VNm!W$rI=<($9$k%W%m%0%i%`$r=q(B $B$-$J(B $B$5$$!#(B

        ($BC"$7!"$"$i$+$8$a(Bi$B$K$O

        int i=3;
        

        $B2rEz(B

        #include <stdio.h>
        main(){
          int i=3;
          if(i>0){
            printf("$B@5$NCM(B\n");
          }else if(i<0){
            printf("$BIi$NCM(B\n");
          }else{ /* i==0 */
            printf("$BNm(B\n");
          }
        }
        

        $B1i=,(B9-7

        $B$"$i$+$8$aIbF0>.?tE@$NJQ?t(Ba, b$B$K$O

        float a=3.0;
        float b=6.0;
        

        $B$3$N$H$-!"(Ba$B!b(B0$B$G$"$k$H$-!"0l

        a x + b = 0
        

        $B$N2r$r5a$aI=<($;$h!#(B

        $B2rEz(B

        #include <stdio.h>
        main(){
          float a=3.0;
          float b=6.0;
          float x;
        
          x=-b/a;
          printf("%f\n",x);
        }
        

        $B1i=,(B9-8

        $B$"$i$+$8$aIbF0>.?tE@$NJQ?t(Ba, b$B$K$O

        float a=3.0;
        float b=6.0;
        

        $B$3$N;~!"<0(B

        a x + b = 0
        

        $B$N2r$r5a$aI=<($;$h!#C"$7!"(Ba$B$,(B 0 $B$G$"$C$F$b@5$7$/2r$rI=<($G$-$k$h(B $B$&$K$;$h!#(B

        $B2rEz(B

        #include <stdio.h>
        main(){
          float a=3.0;
          float b=6.0;
          float x;
        
          if(a==0){
            if(b==0){
              printf("The equation %d x + %d = 0 holds for any x.\n",a,b);
            }else{
              printf("The equation %d x + %d = 0 can not hold for any x.",a,b);
              printf(" That is, this has no root.\n");
            }
          }else{
            x=-b/a;
            printf("The root of the equation %d x + %d =0 is %f\n",a,b,x);
          }
        }
        

        $B1i=,(B9-9

        $B@0?tJQ?t(Bn$B$O

        int n=50;
        

        $B$3$N$H$-!"2hLL$K(B1$B$+$i(Bn$B$^$G$rI=<($9$k%W%m%0%i%`$r=q$1!#(B

        $B2rEz(B

        #include <stdio.h>
        main(){
          int n=50;
          int i;
        
          for(i=1;i<=n;i++){
            printf("%i\n",i);
          }
        }
        

        $B1i=,(B9-10

        $B@0?tJQ?t(Bn$B$O

        int n=50;
        

        $B$3$N$H$-!"2hLL$K(B1$B$+$i(Bn$B$^$G$NOB!"$D$^$j(B

        1+2+3+...+n
        

        $B$NCM$rI=<($9$k%W%m%0%i%`$r=q$1!#(B

        $B2rEz(B

        #include <stdio.h>
        main(){
          int n=50;
          int i,sum;
          sum=0;
          for(i=1;i<=n;i++){
            sum+=i;
          }
          printf("%d\n",sum);
        }
        

        $B1i=,(B9-11

        $B@0?tJQ?t$NG[Ns$K

        int a[10]={5,4,2,0,1,9,7,3,8,6};
        

        $B$3$N;~!"2hLL$K(B a[0] $B$+$i(B a[9] $B$^$G$NCM$rI=<($9$k%W%m%0%i%`$r=q$1!#(B

        $B2rEz(B

        #include <stdio.h>
        main(){
          int a[10]={5,4,2,0,1,9,7,3,8,6};
          int i;
          for(i=0;i<10;i++){
            printf("%d\n",a[i]);
          }
        }
        

        $B1i=,(B9-12

        $B@0?tJQ?t$NG[Ns$K

        int a[10]={5,4,2,0,1,9,7,3,8,6};
        

        $B$3$N;~!"2hLL$K(B a[0] $B$+$i(B a[9] $B$^$G$N9g7W$rI=<($9$k%W%m%0%i%`$r=q$1!#(B

        $B2rEz(B

        #include <stdio.h>
        main(){
          int a[10]={5,4,2,0,1,9,7,3,8,6};
          int i,sum;
          sum=0;
          for(i=0;i<10;i++){
            sum+=a[i];
          }
          printf("%d\n",sum);
        }
        

        $B1i=,(B9-13

        $BIbF0>.?tE@JQ?t$NG[Ns$K

        float x[10]={5.0,4.0,2.0,0.0,1.0,9.0,7.0,3.0,8.0,6.0};
        

        $B$3$N;~!"2hLL$K(B x[0] $B$+$i(B x[9] $B$^$G$NJ?6Q$rI=<($9$k%W%m%0%i%`$r=q$1!#(B

        $B2rEz(B

        #include <stdio.h>
        main(){
          float x[10]={5.0,4.0,2.0,0.0,1.0,9.0,7.0,3.0,8.0,6.0};
          float sum,average;
          int i
          sum=0.0;
          for(i=0;i<10;i++){
            sum+=x[i];
          }
          average=sum/10.0;
          printf("%f\n",average);
        }
        

        $B1i=,(B9-14

        $BJ8;zNs$,

        int k=6;
        char a[]="This is a sample string.";
        

        $B$3$N$H$-!"J8;zNs$N(B k $BJ8;zL\(B($B$D$^$j(B 6 $BJ8;zL\(B)$B$r=PNO$9$k%W%m%0%i%`$r(B $B=q$1!#(B

        $B2rEz(B

        #include <stdio.h>
        main(){
          int k=6;
          char a[]="This is a sample string.";
          printf("%c\n",a[k+1]);
        }
        

        $B1i=,(B9-15

        $BJ8;zNs$,

        char a[]="This is a sample string.";
        

        $B$3$N$H$-!"$3$NJ8;zNs$ND9$5$r=PNO$9$k%W%m%0%i%`$r=q$1!#(B

        $B2rEz(B

        #include <stdio.h>
        main(){
          char a[]="This is a sample string.";
          int i;
          i=0;
          while(a[i]!='\0'){
            i++;
          }
          printf("%d\n",i);
        }
        

        $B1i=,(B9-16

        $BJ8;zNs$,

        char a[]="This is a sample string.";
        

        $B$3$N$H$-!"$3$NJ8;zNs$r5U8~$-$K=PNO$9$k%W%m%0%i%`$r=q$1!#(B

        $B2rEz(B

        #include <stdio.h>
        main(){
          char a[]="This is a sample string.";
          int i;
          i=0;
          while(a[i]!='\0'){
            i++;
          }
          while(i>=0){
            printf("%c",a[i]);
            i--;
          }
        }
        

        $B1i=,(B9-17

        $BJ8;zNs$,

        char c='i';
        char a[]="This is a sample string.";
        

        $B$3$N$H$-!"$3$NJ8;zNsCf$KJQ?t(B c $B$NJ8;z(B($B$D$^$j!V(Bi$B!W(B)$B$,$$$/$D;H$o$l$F(B $B$$$k$+$r=PNO$9$k%W%m%0%i%`$r=q$1!#(B

        $B2rEz(B

        #include <stdio.h>
        main(){
          char c='i';
          char a[]="This is a sample string.";
          int i,num;
          num=0;
          for(i=0;a[i]!='\0';i++){
            if(a[i]==c){
              num++;
            }
          }
          printf("%d\n",num);
        }
        

        $B1i=,(B9-18

        $BJ8;zNs$,

        $B2rEz(B

        char c='m';
        char a[]="This is a sample string.";
        

        $B$3$N$H$-!"$3$NJ8;zNsCf$G:G=i$KJQ?t(B c $B$NJ8;z(B($B$D$^$j!V(Bm$B!W(B)$B$,;H$o$l$F(B $B$$$k(B $BJ8;z$,2?HVL\$+$r=PNO$9$k%W%m%0%i%`$r=q$1!#(B

        #include <stdio.h>
        main(){
          char c='m';
          char a[]="This is a sample string.";
          int i;
          i=0;
          while(a[i]!=c){
            i++;
          }
          printf("%d\n",i+1);
        }
        

        $B1i=,(B9-19

        $BJQ?t$,

        char a[]="-123";
        int i;
        

        $B$3$N$H$-!"(Bi $B$K(B a[] $B$,<($9?t$rBeF~$7!"(Bi $B$NCM$r=PNO$9$k%W%m%0%i%`$r=q(B $B$1!#(B

        $B2rEz(B

        #include <stdio.h>
        main(){
          char a[]="-123";
          int i;
          int j,hugou;
          i=0;
          hugou=1;
          for(j=0;a[j]!='\0';j++){
            if(a[j]=='0'){
              i=i*10;
            }else if(a[j]=='1'){
              i=i*10+1;
            }else if(a[j]=='2'){
              i=i*10+2;
            }else if(a[j]=='3'){
              i=i*10+3;
            }else if(a[j]=='4'){
              i=i*10+4;
            }else if(a[j]=='5'){
              i=i*10+5;
            }else if(a[j]=='6'){
              i=i*10+6;
            }else if(a[j]=='7'){
              i=i*10+7;
            }else if(a[j]=='8'){
              i=i*10+8;
            }else if(a[j]=='9'){
              i=i*10+9;
            }else if((a[j]=='-')&&(hugou==1)){
              hugou=-1;
            }
          }
          i=i*hugou;
          printf("%d\n",i);
        }
        

        $B1i=,(B9-20

        $BJQ?t$,

        char a[]="-123.02";
        float x;
        

        $B$3$N$H$-!"(Bx $B$K(B a[] $B$,<($9?t$rBeF~$7!"(Bx $B$NCM$r=PNO$9$k%W%m%0%i%`$r=q(B $B$1!#(B

        $B2rEz(B

        #include <stdio.h>
        main(){
          char a[]="-123.02";
          float x;
          float div;
          int j,hugou;
          i=0;
          hugou=1;
          for(j=0;(a[j]!='\0')&&(a[j]!='.');j++){
            if(a[j]=='0'){
              x=x*10;
            }else if(a[j]=='1'){
              x=x*10+1;
            }else if(a[j]=='2'){
              x=x*10+2;
            }else if(a[j]=='3'){
              x=x*10+3;
            }else if(a[j]=='4'){
              x=x*10+4;
            }else if(a[j]=='5'){
              x=x*10+5;
            }else if(a[j]=='6'){
              x=x*10+6;
            }else if(a[j]=='7'){
              x=x*10+7;
            }else if(a[j]=='8'){
              x=x*10+8;
            }else if(a[j]=='9'){
              x=x*10+9;
            }else if((a[j]=='-')&&(hugou==1)){
              hugou=-1;
            }
          }
          if(a[j]=='.'){
            j++;
            div=10.o;
            while(a[j]!='\0'){
              /* the case that a[j]=='0' is omitted */
              if(a[j]=='1'){
                x=x+1/div;
              }else if(a[j]=='2'){
                x=x+2/div;
              }else if(a[j]=='3'){
                x=x+3/div;
              }else if(a[j]=='4'){
                x=x+4/div;
              }else if(a[j]=='5'){
                x=x+5/div;
              }else if(a[j]=='6'){
                x=x+6/div;
              }else if(a[j]=='7'){
                x=x+7/div;
              }else if(a[j]=='8'){
                x=x+8/div;
              }else if(a[j]=='9'){
                x=x+9/div;
              }
              j++;
              div*=10;
            }
          }
          x=x*hugou;
          printf("%f\n",x);
        }
        

        9. $BBh==2s(B

        $B1i=,(B10-1

        1. $B$B>e5-$N5-K!$K=q$-D>$7!"%3%s%Q%$%k$7!"
          #include <stdio.h>
          main()
          {
            int i,sum;
          
            sum=0;
            for(i=0;i<50;i=i+1){
              sum=sum+i;
            }
            printf("%d\n",sum);
          }
          

          $B2rEz(B

          #include <stdio.h>
          main()
          {
            int i,sum;
          
            sum=0;
            for(i=0;i<50;i++){
              sum+=i;
            }
            printf("%d\n",sum);
          }
          

          $B1i=,(B10-2

          i++$B$H(B++i$B$O0UL#$,0c$&!#(B $B$3$l$rD4$Y$k$?$a!"%W%m%0%i%`$r=q$$$F3N$+$a(B $B$F$_$?!#(B $B

          1. $B2<5-$N%W%m%0%i%`$,$I$N$h$&$JCM$K$J$k$N$+M=A[$7$J$5$$!#(B
          2. $Bi++$B$H(B++i$B$N0c$$$r@bL@$7$J$5$$!#(B
          #include <stdio.h>
          main()
          {
            int i,j;
          
            i=0;
            j=(i=i+1);
            printf("i=%d, j=%d\n",i,j);
            j=(i+=1);
            printf("i=%d, j=%d\n",i,j);
            j=(i++);
            printf("i=%d, j=%d\n",i,j);
            j=(++i);
            printf("i=%d, j=%d\n",i,j);
          }
          

          $B2rEz(B

          $B7k2L(B
          i=1, j=1
          i=2, j=2
          i=3, j=2
          i=4, j=4
          
          i++ $B$H(B ++i $B$N0c$$(B

          C $B8@8l$G$O!"<0$=$N$b$N$KCM$,$"$k!#(B $BNc$($P!"(B i=1+1 $B$H$$$&<0$G$O!"(B i $B$NCM$O(B 2 $B$K$J$k$,!"<0$NCM$bBeF~$5$l$?7k2L$G$"$k(B 2 $B$K$J$k!#(B $B$D$^$j!"(B j=(i=1+1)+2 $B$H$$$&<0$G$O!"$^$:!"%+%C%3$NCf$,7W;;$5$l!"(B i $B$K(B 2 $B$,BeF~$5$l$k$,!"F1;~$K%+%C%3Fb$N<0$N;}$DCM$b(B 2 $B$K$J$k!#=>$C$F!"$3$N>l9g!"(B j $B$K$O(B 2+2 $B$NCM(B 4 $B$,BeF~$5$l$k!#(B

          $B$5$F!"(B i++ $B$H(B ++i $B$O(B i $B$r(B 1 $B$@$1A}$d$9<0$G$"$j!"(B i $B$NA}$(J}$K4X$7$F$OJQ$o$i$J$$!#(B $B$7$+$7!"$3$l$i$N<0$NCM$O0[$J$k!#(B i++ $B$O!"<0$NCM$O(B 1 $B$rA}$d$9A0$NCM$K$J$k$,!"(B ++i $B$O!"<0$NCM$O(B i $B$K(B 1 $B$rA}$d$7$?8e$NCM$K$J$k!#(B $BNc$($P!"(B(1) j=(++i)+2 $B$H(B (2)j=(i++)+2 $B$H$$$&<0$rHf$Y$F$_$k$H!"$3$l$HEy$7$$<0$O(B (1)i=i+1;j=i+2; (2)j=i+2;i=i+1; $B$H$J$k!#(B

          $B1i=,(B10-3

          1. $B$Belse if $B$N5-K!$r;H$C$F%W%m%0%i%`$r=q$-49$(!"
            #include <stdio.h>
            main()
            {
              char a[]="100101";
              int i,x;
            
              x=0;
              for(i=0;a[i]!='\0';i++){
                if(a[i]=='0'){
                  x*=2;
                }else{
                  if(a[i]=='1'){
                    x=x*2+1;
                  }
                }
              }
              printf("%s(2) = %d(10)\n",a,x);
            }
            

            $B2rEz(B

            $B%W%m%0%i%`$N@bL@(B

            0,1 $B$+$i$J$kJ8;zNs$r(B 2 $B?J?t$H$7$F==?J?t$KJQ49$9$k!#(B

            #include <stdio.h>
            main()
            {
              char a[]="100101";
              int i,x;
            
              x=0;
              for(i=0;a[i]!='\0';i++){
                if(a[i]=='0'){
                  x*=2;
                }else if(a[i]=='1'){
                    x=x*2+1;
                }
              }
              printf("%s(2) = %d(10)\n",a,x);
            }
            

            $B1i=,(B10-4

            #include <stdio.h>
            main()
            {
              char c;
              while((c=getchar())!=EOF)
              {
                putchar(c);
              }
            }
            

            $B>e5-$N%W%m%0%i%`$NL>A0$r(Bex10-1.c$B$H$9$k!#(B

            1. $B$3$N%W%m%0%i%`$r%3%s%Q%$%k$7!" abc(Enter) def(Enter) Ctrl-Z(Enter)(Ctrl $B%\%?%s$r2!$7$J$,$i!"(BZ $B$r2!$9(B)
            2. a.exe < ex10-1.c

            $B2rEz(B

            1. abc
              abc
              def
              def
              
            2. $B%W%m%0%i%`$,$=$N$^$^I=<($5$l$k!#(B

            $B1i=,(B10-5

            #include <stdio.h>
            #define BUFSIZE 1000
            main()
            {
              char c;
              char line[BUFSIZE];
              int i;
            
              do{ 
                i=0;
                c=getchar();
                while((c!=EOF)&&(c!='\n')){
                  if(i<BUFSIZE-1){
                    line[i++]=c;
                  }
                  c=getchar();
                }
                line[i]='\0';
            
                printf("%s\n",line);
              }while(c!=EOF);
            }
            
            1. $B>e5-$N%W%m%0%i%`$O!"(B EOF $B$N$_$N9T$rFI$s$G$b2~9T$r0u:~$7$F$7$^(B $B$&!#(B EOF $B$@$1$rFI$_9~$s$@>l9g!"2~9T$r0u:~$;$:$K%W%m%0%i%`$,=*(B $BN;$9$k$h$&$K2~NI$;$h!#(B
            2. $B%F%-%9%H%U%!%$%k$rFI$_9~$s$G!"9T$K9THV9f$r$D$1$FI=<($9$k%W%m(B $B%0%i%`$r=q$1(B
            3. $B%F%-%9%H%U%!%$%k$N0l9TL\$@$1$r0u:~$9$k%W%m%0%i%`$r=q$1(B
            4. $B%F%-%9%H%U%!%$%k$N:G=i$N(B 3 $B9T$r0u:~$9$k%W%m%0%i%`$r=q$1(B

            $B2rEz(B

            1. $B:G8e$N(B printf $B$N9T$r if(c!=EOF){printf("%s\n",line);}
            2. $B=i$a$NDj5A$NItJ,$K int j=1; $B$=$7$F>e5-$N2~NIItJ,$r if(c!=EOF){printf("%d: %s\n",j++,line);}
            3. do $B$N9T$H:G8e$N(B while $B$N9T$r:o=|$9$k!#(B
            4. $B=i$a$NDj5A$NItJ,$K int k=0; $B$=$7$F:G8e$N(B while $BJ8$r }while((c!=EOF)&&(++k<3));

            10. $BBh==0l2s(B

            $B1i=,(B11-1

            1. $B%U%!%$%k$NJ8;z?t$r?t$($k%W%m%0%i%`$r=q$1(B
            2. $B:n$C$?%W%m%0%i%`$NJ8;z?t$r?t$($5$;$h(B

            $B2rEz(B

            #include <stdio.h>
            main(){
              char c;
              int i;
              i=0;
              while((c=getchar())!=EOF){
                i++;
              }
              printf("%d\n",i);
            }
            

            $B1i=,(B11-2

            1. $B%U%!%$%k$NCf$K!V(Ba$B!W$H$$$&J8;z$,$$$/$D$"$k$+?t$($k%W%m%0%i%`$r=q$1(B
            2. $B:n$C$?%W%m%0%i%`$K!V(Ba$B!W$,2?J8;z$"$k$+?t$($5$;$h(B

            $B2rEz(B

            #include <stdio.h>
            main(){
              char c;
              int i;
              i=0;
              while((c=getchar())!=EOF){
                if(c=='a'){
                 i++;
                }
              }
              printf("%d\n",i);
            }
            

            $B1i=,(B11-3

            1. $B%U%!%$%k$NCf$N!V(Ba$B!W$H$$$&J8;z$rBgJ8;z(B($B$D$^$j!V(BA$B!W(B)$B$KJQ$($FI=<($9$k%W%m%0%i%`$r=q$1(B
            2. $B:n$C$?%W%m%0%i%`Cf$N!V(Ba$B!W$rBgJ8;z$KJQ$($FI=<($;$h(B

            $B2rEz(B

            #include <stdio.h>
            main(){
              char c;
              int i;
              i=0;
              while((c=getchar())!=EOF){
                if(c=='a'){
                  c='A';
                }
                putchar(c); 
              }
            }
            

            $B1i=,(B11-4

            1. $B%U%!%$%k$N9T?t$r?t$($k%W%m%0%i%`$r=q$1(B ($B%R%s%H(B: $B9T$O(B '\n' $B$G=*$k(B)
            2. $B:n$C$?%W%m%0%i%`$N9T?t$r?t$($5$;$h(B

            $B2rEz(B

            #include <stdio.h>
            main(){
              char c;
              int i;
              i=1;
              while((c=getchar())!=EOF){
                if(c=='\n'){
                  i++;
                }
              }
              printf("%d\n",i);
            }
            

            $B1i=,(B11-5

            1. $B%U%!%$%k$r0l9T$:$D6u$1$FI=<($9$k%W%m%0%i%`$r=q$1(B
            2. $B:n$C$?%W%m%0%i%`$r0l9T$:$D6u$1$FI=<($5$;$h(B

            $B2rEz(B

            #include <stdio.h>
            main(){
              char c;
              int i;
              i=0;
              while((c=getchar())!=EOF){
                if(c=='\n'){
                  putchar('\n');
                }
                putchar(c);
              }
            }
            

            $B1i=,(B11-6

            1. 3 $B9TL\$@$1$rI=<($9$k%W%m%0%i%`$r=q$1(B
            2. $B:n$C$?%W%m%0%i%`$N(B 3 $B9TL\$rI=<($;$h(B ($BCm0U(B: $B%U%!%$%k$,(B 2 $B9T0J2<$@$C$?$i!"2?$b$;$:$K=*N;$7$J$/$F$O$$$1$J$$!#(B)

            $B2rEz(B

            #include <stdio.h>
            #define BUFSIZE 1000
            main()
            {
              char c;
              char line[BUFSIZE];
              int i;
              int j;
              j=1;
              do{ /* do{ $BJ8(B } while($B>r7o(B); $B$K4X$7$F$O8e=R(B */
                i=0;
                c=getchar();
                while((c!=EOF)&&(c!='\n')){
                  if(i<BUFSIZE-1){
                    line[i++]=c; /* line[i] $B$K(B c $B$rF~$l$?8e!"(B i $B$r0l$DA}$d$9(B */
                  }
                  c=getchar();
                }
                line[i]='\0';  /* $B9T$N:G8e$KJ8;zNs$N=*$j$NJ8;z$rF~$l$k(B */
            
                if(j==3){
                  printf("%s\n",line);
                }
                j++;
              }while((c!=EOF)||j>3);
            }
            

            $B1i=,(B11-7

            1. $B!V(Ba$B!W$r4^$`9T$@$1$rI=<($9$k%W%m%0%i%`$r=q$1(B
            2. $B:n$C$?%W%m%0%i%`$G!"!V(Ba$B!W$r4^$`9T$@$1$rI=<($;$h(B

            $B2rEz(B

            #include <stdio.h>
            #define BUFSIZE 1000
            main()
            {
              char c;
              char line[BUFSIZE];
              int i;
              int j,find;
            
              do{ /* do{ $BJ8(B } while($B>r7o(B); $B$K4X$7$F$O8e=R(B */
                i=0;
                c=getchar();
                while((c!=EOF)&&(c!='\n')){
                  if(i<BUFSIZE-1){
                    line[i++]=c; /* line[i] $B$K(B c $B$rF~$l$?8e!"(B i $B$r0l$DA}$d$9(B */
                  }
                  c=getchar();
                }
                line[i]='\0';  /* $B9T$N:G8e$KJ8;zNs$N=*$j$NJ8;z$rF~$l$k(B */
            
                find=0;
                for(j=0;line[j]!='\0';j++){
                  if(line[j]=='a'){
                    find=1;
            	break;
                  }
                }
                if(find){
                  printf("%s\n",line);
                }
              }while(c!=EOF);
            }
            

            $B1i=,(B11-8

            1. $B3F9T$N@hF,(B 3 $BJ8;z$@$1$rI=<($9$k%W%m%0%i%`$r:n$j$J$5$$!#(B
            2. $B:n@.$7$?%W%m%0%i%`$N3F9T$r(B 3 $BJ8;z$@$1I=<($7$J$5$$!#(B ($BCm0U(B: $B$"$k9T$K(B 2 $BJ8;z$7$+$J$1$l$P!"(B 2 $BJ8;z$@$1$rI=<($9$k(B)

            $B2rEz(B

            #include <stdio.h>
            #define BUFSIZE 1000
            main()
            {
              char c;
              char line[BUFSIZE];
              int i;
              int j;
            
              do{ /* do{ $BJ8(B } while($B>r7o(B); $B$K4X$7$F$O8e=R(B */
                i=0;
                c=getchar();
                while((c!=EOF)&&(c!='\n')){
                  if(i<BUFSIZE-1){
                    line[i++]=c; /* line[i] $B$K(B c $B$rF~$l$?8e!"(B i $B$r0l$DA}$d$9(B */
                  }
                  c=getchar();
                }
                line[i]='\0';  /* $B9T$N:G8e$KJ8;zNs$N=*$j$NJ8;z$rF~$l$k(B */
            
                for(j=0;(j<3)&&(line[j]!='\0');j++){
                  putchar(line[j]);
                }
                putchar('\n');
              }while(c!=EOF);
            }
            

            $B1i=,(B11-9

            1. $B3F9T$N@hF,$N6uGr$N?t$r=PNO$9$k%W%m%0%i%`$r=q$-$J$5$$!#(B
            2. $B:n@.$7$?%W%m%0%i%`$N3F9T$N@hF,$N6uGr$N?t$r=PNO$7$J$5$$!#(B

            $B2rEz(B

            #include <stdio.h>
            #define BUFSIZE 1000
            main()
            {
              char c;
              char line[BUFSIZE];
              int i;
              int j;
            
              do{ /* do{ $BJ8(B } while($B>r7o(B); $B$K4X$7$F$O8e=R(B */
                i=0;
                c=getchar();
                while((c!=EOF)&&(c!='\n')){
                  if(i<BUFSIZE-1){
                    line[i++]=c; /* line[i] $B$K(B c $B$rF~$l$?8e!"(B i $B$r0l$DA}$d$9(B */
                  }
                  c=getchar();
                }
                line[i]='\0';  /* $B9T$N:G8e$KJ8;zNs$N=*$j$NJ8;z$rF~$l$k(B */
            
                for(j=0;line[j]==' ';j++){
                }
                printf("%d\n",j);
              }while(c!=EOF);
            }
            

            $B1i=,(B11-10

            MS-DOS $B%3%^%s%I$N(B edit $B$O$C$F!"(BWWW $B$+$i%+%C%H%P%C%U%!$rMxMQ$7$F(B edit $B$KE=$jIU$1$r9T$&$H!"%W%m%0%i%`$K$OM>J,$J6uGr$,A^F~$5$l$F$7$^$&!#(B

            $B$=$3$G!"A^F~$5$l$?M>J,$J6uGr$r$C$?%W%m%0%i%`$r:n$j$J$5$$!#(B

            1. $B$B%U%!%$%k$,=*$k$^$G0J2<$r7+$jJV$9(B
              1. $B9T$rFI$_9~$`(B
              2. $B6uGr$r$B

              $B2rEz(B

              #include <stdio.h>
              #define BUFSIZE 1000
              main()
              {
                char c;
                char line[BUFSIZE];
                int i;
                int j;
                int space=0;
              
                do{ /* do{ $BJ8(B } while($B>r7o(B); $B$K4X$7$F$O8e=R(B */
                  i=0;
                  c=getchar();
                  while((c!=EOF)&&(c!='\n')){
                    if(i<BUFSIZE-1){
                      line[i++]=c; /* line[i] $B$K(B c $B$rF~$l$?8e!"(B i $B$r0l$DA}$d$9(B */
                    }
                    c=getchar();
                  }
                  line[i]='\0';  /* $B9T$N:G8e$KJ8;zNs$N=*$j$NJ8;z$rF~$l$k(B */
              
                  for(j=0;j<space;j++){
                    if(line[j]!=' '){
                      break;
                    }
                  }
                  while(line[j]!='\0'){
                    putchar(line[j++]);
                  }
                  for(space=0;line[space]==' ';space++){
                  }
                }while(c!=EOF);
              }
              

              $B1i=,(B11-11

              $BF~NO$7$??t$K(B 1 $B$rB-$7$FI=<($9$k%W%m%0%i%`$r=q$-$J$5$$!#(B

              $B2rEz(B

              #include <stdio.h>
              main(){
                int x;
                scanf("%d",x);
                printf("\n%d\n",x+1);
              }
              

              $B1i=,(B11-12

              $BFs$D$N?t$rF~NO$7!"9g7W$r=PNO$9$k%W%m%0%i%`$r=q$-$J$5$$!#(B

              $B2rEz(B

              #include <stdio.h>
              main(){
                int x,y;
                scanf("%d",x);
                scanf("%d",y);
                printf("\n%d\n",x+y);
              }
              

              $B:dK\D>;V(B [email protected]