$B$3$N%I%-%e%a%s%H$O(B http://edu.net.c.dendai.ac.jp/ $B>e$G8x3+$5$l$F$$$^$9!#(B
$B!V(BPlace$B!W%\%?%s$r2!$9$H!":n6HNN0h$K2hLL$,@Z$jBX$o$j$^$9!#(B $BGr$$2hLL$NCf1{IU6a$r:8%/%j%C%/$9$k$H!"Dq93$rI=$95-9f$,I=<($5$l$^$9!#(B
$BDq93$N5-9f$r;X$7$F1&%/%j%C%/$7$F!V(BDuplicate$B!W$rA*Br$9$k!#(B $B$=$7$F9g7W(B 3 $BK\$NDq93$rG[CV$7$^$9!#(B $BDq935-9f$r1&%/%j%C%/$7$F!V(BEdit Device Data$B!W$rA*$S$^$9!#(B $B!V(BLabel-Value$B!W$H$$$&Ms$,Dq93CM$rI=$7$^$9$N$G!"$3$3$GDq93CM$r;XDj$7$^(B $B$9!#(B
$B2<$N2sO)?^$G(B1$B&8$NDq93$rN.$l$kEEN.$NBg$-$5$r5a$a$J$5$$!#(B
$BEECS$O(B(Anarog, Power, Battery)$B!#(B $BEEN.$rB,Dj$9$k$K$O%^%k%A%a!<%?$G(B current $B$r;XDj$7$^$9!#(B $B40@.?^$O
$B2<$N2sO)?^$G!"(BA $BE@$H(B B $BE@$NEE05$rD4$Y!"A}I}N($r5a$a$J$5$$!#(B
1kHz $B$rF~NO$9$k$K$O!"(B(Analog, Instruments, Signal Gen) $B$rA*$S$^$9!#(B $BEE05$NI}$rF~NO$9$k$K$O!"(BSignal Gen $B$N5-9f$r1&%/%j%C%/$7!"!V(BEdit Signal Generator$B!W$rA*$S$^$9!#$=$7$F!"!V(BPeak Amplitude$B!W$NMs$K(B 100mV $B$rF~NO$7$^$9!#(B
$B2<$N2sO)?^$G!"(BA $BE@$H(B B $BE@$NEE05$rD4$Y!"A}I}N($r5a$a$J$5$$!#(B
$BNkLZ2m?C!V
$BFs?J?t0l7e(B($B$D$^$j(B 0 $B$+(B 1)$B$rFs$DF~NO$7$F!"B-$7;;$r
$B0J2<$K<($9A42C;;4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B?t$rI=$9;~!"2<$N7e$+$iI=$9$N$r(B little endian $B$H8@$$!">e$N7e(B
$B$+$iI=$9$N$r(B big endian $B$H8@$$$^$9!#(B
$B?M4V$ODL>o(B big endian $B$G?t$rI=8=$7$^$9$,!"%3%s%T%e!<%?$G$O(B little
endian $B$NJ}$,=hM}$KJXMx$J>l9g$b$"$j!";H$o$l$k$3$H$,$"$j$^$9!#(B
Intel $B
$B$7$J$5$$!#(B
$B$^$?!"(B n $B$NCM$r(B 32, 60 $B$KJQ$($F=PNO$,$I$&$J$k$+D4$Y$J$5$$!#(B
$BM>M5$,$"$k?M$OLs?t$N?t$@$1I=<($9$k$h$&$K2~B$$7$J$5$$!#(B
Mupad $B$r%@%&%s%m!<%I$7$F$*$$$F2<$5$$!#(B
x y z1 z0
0 0 0 0
0 1 0 1
1 0 0 1
1 1 1 0
$B%R%s%H(B
$B1i=,(B9-6
x y c z1 z0
0 0 0 0 0
0 1 0 0 1
1 0 0 0 1
1 1 0 1 0
0 0 1 0 1
0 1 1 1 0
1 0 1 1 0
1 1 1 1 1
$B%R%s%H(B
9-2. $B7+$jJV$7(B
while$BJ8(B
while($B>r7o<0(B){
$B7+$jJV$7J8(B
}
$B%k!<%WJQ?t(B = 1;
while($B%k!<%WJQ?t(B <= 5){
$B=hM}(B;
$B%k!<%WJQ?t(B = $B%k!<%WJQ?t(B +1;
}
$B1i=,(B9-7
#include <stdio.h>
main(){
int a;
a=0;
while(a<5){
printf("$B!{(B");
a=a+1;
}
printf("\n");
}
$B1i=,(B9-8
#include <stdio.h>
main(){
int b;
b=2;
while(b<=10){
printf("$B%k!<%WJQ?t(B = %d\n",b);
b=b+2;
}
}
$B1i=,(B9-9
#include <stdio.h>
main(){
int i,b;
i=0;
while(i<10){
b=2*(i+1);
printf("%d, ",b);
i=i+1;
}
printf("\n");
}
$B1i=,(B9-10
#include <stdio.h>
#include <math.h>
main(){
int i;
float x,y;
i=0;
while(i<20){
x = /* x $B$NCM$O(B 0 $B$+$i(B 2$B&P$N4V(B $B$r$H$k$h$&$K$9$k!#(B */
y = /* sin x $B$NCM$rF~$l$k(B */
printf("x=%f, sin(x)=%f\n",x,y)
/* i $B$NCM$r99?7$9$k(B */
}
}
$B1i=,(B9-11
1, 1, 2, 3, 5, 8, 13, 21, 34, 53, ...
a0=1
a1=1
ai=ai-1+ai-2 (i$B!f(B2)
C $B8@8l$NFHFC$N5-K!(B(1)$B<0$NCM(B
i=j=0
if(x!=0){}
if(x){}
$B1i=,(B9-12
C $B8@8l$NFHFC$N5-K!(B(2)$BBeF~1i;;;R(B
$B1i=,(B9-13
#include <stdio.h>
main(){
int i,j;
printf("i=0 $B$G(B i $B$K(B 1 $B$rA}$d$9(B\n");
i=0;j=(i=i+1);printf("i $B$NCM(B %d, $B<0$NCM(B %d\n",i,j);
i=0;j=(i+=1);printf("i $B$NCM(B %d, $B<0$NCM(B %d\n",i,j);
i=0;j=(++i);printf("i $B$NCM(B %d, $B<0$NCM(B %d\n",i,j);
i=0;j=(i++);printf("i $B$NCM(B %d, $B<0$NCM(B %d\n",i,j);
}
$B1i=,(B9-14
#include <stdio.h>
main(){
int i;
i=5;
while(i--){
printf("%d\n",i);
}
}
$B1i=,(B9-15
$B!|(B
$B!|!|(B
$B!|!|!|(B
$B!|!|!|!|(B
$B!|!|!|!|!|(B
$B!|!|!|!|!|!|(B
#include <stdio.h>
main(){
int i, j;
i=5;
while(j=i--){
while(j--){
printf("$B!{(B");
}
printf("\n");
}
}
for $BJ8(B
for($B0lHV$O$8$a$K$@$1
for(i=0;i<10;++i){
printf("%d\n",i);
}
i=0;
while(i<10){
printf("%d\n",i);
++i;
}
$B1i=,(B9-16
#include <stdio.h>
main(){
int n;
n=11;
for(;n;n/=2){
printf("%d",n%2);
}
printf("\n");
}
$B;29M(B
$B1i=,(B9-17
#include <stdio.h>
main(){
int n,i;
n=18;
printf("%d$B$NLs?t$O(B",n);
i=1;
while(i<=n){
if(!(n%i)){
printf(" %d",i);
}
i++;
}
printf("\n");
}
9-3. $B=IBj(B
$B:dK\D>;V(B <[email protected]>
$BEl5~EE5!Bg3X9)3XIt>pJsDL?.9)3X2J(B