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(B c:\gcc-2.95.2 $B$K%$%s%9%H!<%k$5$l$k!#(B
($B%I%-%e%a%s%H(B($B1Q8l(B)$B$b%$%s%9%H!<%k$9$Y$7(B)
gcc $B$N;H$$J}(B
- MS-DOS $B%W%m%s%W%H$G;HMQ$9$k!#(B
- $B;HMQ$9$kA0$K0l2s$@$1(Bc:\gcc-2.95.2\mingw32
$B$rF~NO$7!"4D6-JQ?t(B($B%7%'%k$KEO$9>pJs(B)$B$r%;%C%H$9$k(B
($B3NG'J}K!(B:
set $B$rF~NO$7!"I=<($K(B gcc $B$,4^$^$l$k9`L\$,$"$l$P(B OK)
- $BMxMQ$G$-$k%3%^%s%I(B(c:\gcc-2.95.2\bin )
- gcc:
- C $B%3%s%Q%$%i(B($B9=B$7?8@8l(B)
- g++,c++:
- C++ $B%3%s%Q%$%i(B($B%*%V%8%'%/%H;X8~8@8l(B)
- g77:
- FORTRAN $B%3%s%Q%$%i(B($Bas:
- $B%"%;%s%V%i(B
- make:
- $B%W%m%0%i%`$N3+H/;Y1g%=%U%H%&%'%"(B
- gdb:
- $B%G%P%C%,(B
$B1i=,(B2
$B
/* This program prints "Hello World!". */
#include <stdio.h>
main(){
printf("Hello World!\n");
}
- stdio.h
- printf $B4X?t$rMxMQ$9$k$H$-!";XDj$,I,MW(B
- $B!V(B\n$B!W(B
- $B2~9T5-9f(B
$B1i=,(B3
$B$3$N%W%m%0%i%`$r
(3-1)$B$^$:!":n6H%G%#%l%/%H%j$r:n$k(B
- MS-DOS $B%W%m%s%W%H2hLL$r3+$/(B
- cd \
- ren d home
ren $B$O(B rename $B%3%^%s%I!#@hF|:n@.$7$?%G%#%l%/%H%j(B d $B$r(B home $B$H$$$&L>A0$K=q$-49$($k!#(B
$B0J8e!"%G%#%l%/%H%jL>!"%U%!%$%kL>$O1Q?t;z$GI=$9!#(B
$BF|K\8l$r;HMQ$9$k$H!"Hs>o$KITJX$GITET9g$,5/$-$k$N$GCm0U!#(B
(3-2)$B2<=`Hw(B
- c:\gcc-2.95.2\mingw32
- cd home
- edit hello.c
- $B%V%i%&%6$G$3$N$B;qNA(B$B$r3+$/!#(B
- $B%W%m%0%i%`ItJ,$r%I%i%C%0$7!"(BCtrl-C$B$G%3%T!<(B
- MS-DOS $B2hLL$N%a%K%e!<%P!<$NE=$jIU$1%\%?%s$G%Z!<%9%H(B
- $B%U%!%$%k$rJ]B8$9$k!#(B
exit
$B$G=*N;$9$k!#(B
(3-3)$B%3%s%Q%$%k(B
- gcc hello.c
($B%3%s%Q%$%k$7$F$G$-$?A0$K$J$k(B)
(3-5)$B
- .\a.exe
$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
$B1i=,(B5
$B
/* program 1*/
#include <stdio.h>
#include <math.h>
main()
{
float a,b,c,d,kai1,kai2,zitsubu,kyobu;
a=2.0; b=3.0; c=1.0;
printf(" %f x^2 + %f x + %f = 0\n",a,b,c);
d=b*b-4*a*c;
if(d==0){
kai1 = -b/2/a;
printf("root = %f\n", kai1);
}else{
if( d>0 ){
kai1 = (-b + sqrt(d))/2/a; kai2 = (-b - sqrt(d))/2/a;
printf("root1= %f, root2= %f\n",kai1,kai2);
}else{
zitsubu= -b/2/a; kyobu = sqrt(d)/2/a;
printf("kai = %f +- %fi\n",zitsubu,kyobu);
}
}
}
$B1i=,(B6
$B$3$N%W%m%0%i%`$r%3%s%Q%$%k$7
($BCm0U(B)
$B%3%s%Q%$%k$9$k;~!"(B
gcc C$B$N%U%!%$%kL>(B -lm
$B$H!"!V(B-lm$B!W$r;XDj$9$kI,MW$,$"$k!#(B
$B:dK\D>;V(B [email protected]