P06.ppt

Similar documents
PowerPoint Presentation

P05.ppt

main

P02.ppt

C言語によるアルゴリズムとデータ構造

新版明解C言語入門編

C¥×¥í¥°¥é¥ß¥ó¥° ÆþÌç

P03.ppt

/* do-while */ #include <stdio.h> #include <math.h> int main(void) double val1, val2, arith_mean, geo_mean; printf( \n ); do printf( ); scanf( %lf, &v

[1] #include<stdio.h> main() { printf("hello, world."); return 0; } (G1) int long int float ± ±

新版明解C言語 実践編

tuat1.dvi

新・明解C言語で学ぶアルゴリズムとデータ構造

3.1 stdio.h iostream List.2 using namespace std C printf ( ) %d %f %s %d C++ cout cout List.2 Hello World! cout << float a = 1.2f; int b = 3; cout <<

x h = (b a)/n [x i, x i+1 ] = [a+i h, a+ (i + 1) h] A(x i ) A(x i ) = h 2 {f(x i) + f(x i+1 ) = h {f(a + i h) + f(a + (i + 1) h), (2) 2 a b n A(x i )

Microsoft Word - no15.docx

‚æ4›ñ

double float

Microsoft Word - no14.docx

Microsoft PowerPoint - 説柔5_間勊+C_guide5ï¼›2015ã•’2015æŒ°æŁŽæš’å¯¾å¿œç¢ºèª“æ¸‹ã†¿ã•‚.pptx

新・明解C言語 ポインタ完全攻略

Microsoft PowerPoint - 説明3_if文switch文(C_guide3)【2015新教材対応確認済み】.pptx

C B

A/B (2010/10/08) Ver kurino/2010/soft/soft.html A/B

C C UNIX C ( ) 4 1 HTML 1

1.ppt

C言語7

Taro-プログラミングの基礎Ⅱ(公

C 2 / 21 1 y = x 1.1 lagrange.c 1 / Laglange / 2 #include <stdio.h> 3 #include <math.h> 4 int main() 5 { 6 float x[10], y[10]; 7 float xx, pn, p; 8 in

untitled

C による数値計算法入門 ( 第 2 版 ) 新装版 サンプルページ この本の定価 判型などは, 以下の URL からご覧いただけます. このサンプルページの内容は, 新装版 1 刷発行時のものです.

PowerPoint Presentation

Microsoft PowerPoint - 説明2_演算と型(C_guide2)【2015新教材対応確認済み】.pptx

解きながら学ぶC言語

PC Windows 95, Windows 98, Windows NT, Windows 2000, MS-DOS, UNIX CPU

( ) ( ) 30 ( ) 27 [1] p LIFO(last in first out, ) (push) (pup) 1

I ASCII ( ) NUL 16 DLE SP P p 1 SOH 17 DC1! 1 A Q a q STX 2 18 DC2 " 2 B R b

Microsoft PowerPoint - C言語の復習(配布用).ppt [互換モード]

Microsoft Word - no206.docx

Taro-リストⅢ(公開版).jtd

橡Pro PDF

#6 : ( 8-13) URL : j inoue/index.html : Neugart

Microsoft Word - no15.docx

1 4 2 EP) (EP) (EP)

‚æ2›ñ C„¾„ê‡Ìš|

[ 1] 1 Hello World!! 1 #include <s t d i o. h> 2 3 int main ( ) { 4 5 p r i n t f ( H e l l o World!! \ n ) ; 6 7 return 0 ; 8 } 1:

8 / 0 1 i++ i 1 i-- i C !!! C 2

18 C ( ) hello world.c 1 #include <stdio.h> 2 3 main() 4 { 5 printf("hello World\n"); 6 } [ ] [ ] #include <stdio.h> % cc hello_world.c %./a.o

II 3 yacc (2) 2005 : Yacc 0 ~nakai/ipp2 1 C main main 1 NULL NULL for 2 (a) Yacc 2 (b) 2 3 y

C プログラミング演習 1( 再 ) 2 講義では C プログラミングの基本を学び 演習では やや実践的なプログラミングを通して学ぶ

Microsoft Word - C言語研修 C++編 3.doc

WinHPC ppt

Java 3 p.2 3 Java : boolean Graphics draw3drect fill3drect C int C OK while (1) int boolean switch case C Calendar java.util.calendar A

void hash1_init(int *array) int i; for (i = 0; i < HASHSIZE; i++) array[i] = EMPTY; /* i EMPTY */ void hash1_insert(int *array, int n) if (n < 0 n >=

1 return main() { main main C 1 戻り値の型 関数名 引数 関数ブロックをあらわす中括弧 main() 関数の定義 int main(void){ printf("hello World!!\n"); return 0; 戻り値 1: main() 2.2 C main

I. Backus-Naur BNF : N N 0 N N N N N N 0, 1 BNF N N 0 11 (parse tree) 11 (1) (2) (3) (4) II. 0(0 101)* (

1 1.1 C 2 1 double a[ ][ ]; 1 3x x3 ( ) malloc() 2 double *a[ ]; double 1 malloc() dou

導入基礎演習.ppt

Microsoft Word - no13.docx

untitled

XMPによる並列化実装2

1 ( )

Microsoft Word - no11.docx

Taro-再帰関数Ⅱ(公開版).jtd

I J

joho07-1.ppt

新・明解C言語 実践編

Taro-リストⅠ(公開版).jtd

kiso2-09.key

untitled

program_japanese

超初心者用

(search: ) [1] ( ) 2 (linear search) (sequential search) 1

#define N1 N+1 double x[n1] =.5, 1., 2.; double hokan[n1] = 1.65, 2.72, 7.39 ; double xx[]=.2,.4,.6,.8,1.2,1.4,1.6,1.8; double lagrng(double xx); main

:30 12:00 I. I VI II. III. IV. a d V. VI


I. Backus-Naur BNF S + S S * S S x S +, *, x BNF S (parse tree) : * x + x x S * S x + S S S x x (1) * x x * x (2) * + x x x (3) + x * x + x x (4) * *

comment.dvi

2004

ex14.dvi

Microsoft Word - 3new.doc

kiso2-03.key

untitled

2017 p vs. TDGL 4 Metropolis Monte Carlo equation of continuity s( r, t) t + J( r, t) = 0 (79) J s flux (67) J (79) J( r, t) = k δf δs s( r,

printf("5つの整数を入力して下さい \n"); /* データ入力 */ for( /*** 02 ***/ ){ printf("%dつ目の入力 :",i+1); scanf("%d", /*** 03 ***/ ); sum=dat[0]; /* 合計値の初期設定 */ n_max= 0


£Ã¥×¥í¥°¥é¥ß¥ó¥°ÆþÌç (2018) - Â裵²ó ¨¡ À©¸æ¹½Â¤¡§¾ò·ïʬ´ô ¨¡

ex12.dvi

untitled

π, R { 2, 0, 3} , ( R),. R, [ 1, 1] = {x R 1 x 1} 1 0 1, [ 1, 1],, 1 0 1,, ( 1, 1) = {x R 1 < x < 1} [ 1, 1] 1 1, ( 1, 1), 1, 1, R A 1

gengo1-11

資料5:聖ウルスラ学院英智小・中学校 提出資料(1)

1.1 1 C IIA $ cd comp3a %endminipage ~/comp3a mkdir $ mkdir comp3a $ cd comp3a C.c Emacs Cntrol x Control s 2 Emacs Control-x Control-f Control-

II ( ) prog8-1.c s1542h017%./prog8-1 1 => 35 Hiroshi 2 => 23 Koji 3 => 67 Satoshi 4 => 87 Junko 5 => 64 Ichiro 6 => 89 Mari 7 => 73 D

Microsoft Word - no12.doc

r1.dvi

Microsoft Word - Cプログラミング演習(7)

実際の株価データを用いたオプション料の計算

関数の動作 / printhw(); 7 printf(" n"); printhw(); printf("############ n"); 4 printhw(); 5 関数の作り方 ( 関数名 ) 戻り値 ( 後述 ) void である. 関数名 (

1 1.1 C 2 1 double a[ ][ ]; 1 3x x3 ( ) malloc() malloc 2 #include <stdio.h> #include

Transcription:

p.130 p.198 p.208 2 1

double weight[num]; double min, max; min = max = weight[0]; for( i= 1; i < NUM; i++ ) if ( weight[i] > max ) max = weight[i]: if ( weight[i] < min ) min = weight[i]: weight 3 maxof(a, b); int maxof( int x, int y ) maxof(a, bc); int maxof( int x, int yint z ) 4 2

main int eng[5]; /* / int max_e; /* / eng max_e = maxof( eng, 5 ); [] mainengmaxo fvc int maxof( int vc[], int no ) int vc[0]vc[4] main eng[0] eng[1] eng[2] eng[3] vc[0] vc[1] vc[2] vc[3] maxof eng[4] vc[4] 5 list0611.c (p.130) #define NUMBER5 int max_of(int vc[], int no) int i; int max = vc[0]; for (i = 1; i < no; i++) if (vc[i] > max) max = vc[i]; return (max); int i; int eng[number]; int mat[number]; int max_e, max_m; printf("%d\n", NUMBER); for (i = 0; i < NUMBER; i++) printf("[%d] ", i + 1); scanf("%d", &eng[i]); printf( " "); scanf("%d", &mat[i]); max_e = max_of(eng, NUMBER); max_m = max_of(mat, NUMBER); printf("%d\n", max_e); printf("%d\n", max_m); return (0); 6 3

main int na, nb, max; na = 24; nb = 62; max = maxof( na, nb ); return int maxof( int x, int y ) na, nbx, y if (x > y) return (x); else return (y); 7 8 4

include <stdio.h> void set_value( int x, int y ) x = 0; y = 0; int na, nb; na = 10; nb = 5; set_value( na, nb ); printf( na= %d\n, na ); printf( nb= %d\n, nb ); return (0); 9 include <stdio.h> void set_value( int vc[] ) vc[0] = 0; vc[1] = 0; int x[2]; x[0] = 10; x[1] = 5; set_value( x ); printf( x[0]= %d\n, x[0] ); printf( x[1]= %d\n, x[1] ); return (0); main x[0] x[1] = = vc[0] vc[1] set_value 0 0 10 5

list0612.c (p.132) 11 x, int x = 77; void print_x1(void) int x = 777; void print_x2(void) printf( "x = %d\n", x ); int x=7; print_x1(); print_x2(); return(0); 12 6

int x = 77; int x=7; main void print_x1(void) int x = 777; void print_x2(void) printf( "x = %d\n", x ); print_x1(); print_x2(); return(0); main 13 int x = 77; int x=7; print_x1(); print_x2(); main return(0); 14 7

x, int x = 77; int x=7; void print_x1(void) int x = 777; void print_x2(void) printf( "x = %d\n", x ); print_x1(); print_x2(); return(0); 15 main #include, #definemain 16 8

count.c int count = 0; int i; void func1(void) printf( fun1 was called\n" ); count++; void func2(void) printf( fun2 was called\n" ); count++; func1(); func2(); for(i=0; i < 5; i++) func1(); for(i=0; i < 3; i++) func2(); printf( count = %d\n", count ); return(0); 17 list0619.c int fx = 0; void func(void) static int sx = 0 ; int ax = 0; printf("%3d%3d%3d\n", ax++, sx++, fx++); int i; puts(" ax sx fx"); puts("----------"); for (i = 0; i < 10; i++) func(); puts("----------"); return (0); ax sx fx -------------- 0 0 0 0 1 1 0 2 2 0 3 3 18 9

-1kadai6-1.c int search_value( int x[ ], int key ); -1 5 int5 5 search_value search_value 19 N kadai6-2c A80-100 : **** B70-79 : ******* C60-69 : **** D 0-59 void display_graph( int tensu[ ], int num ); kadai6-3.c void heikin_bunsan( int tensu[ ], int num ); 20 10