‚æ4›ñ

Similar documents
(1 ) scanf(

untitled

char int float double の変数型はそれぞれ 文字あるいは小さな整数 整数 実数 より精度の高い ( 数値のより大きい より小さい ) 実数 を扱う時に用いる 備考 : 基本型の説明に示した 浮動小数点 とは数値を指数表現で表す方法である 例えば は指数表現で 3 書く

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

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

Microsoft PowerPoint - CproNt02.ppt [互換モード]

gengo1-2

PowerPoint Presentation

解きながら学ぶC++入門編

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-

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

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

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

数値計算

Microsoft Word - C.....u.K...doc

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

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) * *

Minimum C Minimum C Minimum C BNF T okenseq W hite Any D

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

P03.ppt

Java演習(4) -- 変数と型 --

/* 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

P05.ppt

tuat1.dvi

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

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)* (

double float

プログラミング基礎

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

[ 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:

fuga scanf("%lf%*c",&fuga); 改行文字を読み捨てる 10 進数の整数 おまじない取り込んだ値を代入する変数 scanf( %d%*c,&hoge); キーボードから取り込め という命令 1: scanf 1 1: int double scanf %d %lf printf

解きながら学ぶJava入門編

2 P.S.P.T. P.S.P.T. wiki 26

計算機プログラミング

やさしいJavaプログラミング -Great Ideas for Java Programming サンプルPDF

8 if switch for while do while 2

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

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

Java updated

C のコード例 (Z80 と同機能 ) int main(void) { int i,sum=0; for (i=1; i<=10; i++) sum=sum + i; printf ("sum=%d n",sum); 2

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

A/B (2018/10/19) Ver kurino/2018/soft/soft.html A/B

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

joho07-1.ppt

O(N) ( ) log 2 N

新版明解C言語 実践編

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

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 PowerPoint - C言語の復習(配布用).ppt [互換モード]

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

プログラミング方法論 II 第 14,15 回 ( 担当 : 鈴木伸夫 ) 問題 17. x 座標と y 座標をメンバに持つ構造体 Point を作成せよ 但し座標 は double 型とする typedef struct{ (a) x; (b) y; } Point; 問題 18. 問題 17 の

Java Java Java Java Java 4 p * *** ***** *** * Unix p a,b,c,d 100,200,250,500 a*b = a*b+c = a*b+c*d = (a+b)*(c+d) = 225

卒 業 研 究 報 告.PDF

£Ã¥×¥í¥°¥é¥ß¥ó¥°ÆþÌç (2018) - Â裶²ó ¨¡ À©¸æ¹½Â¤¡§·«¤êÊÖ¤· ¨¡

橡Pro PDF


Microsoft PowerPoint - 14Chap17.ppt

Prog1_15th

Java プログラミング Ⅰ 3 回目変 数 今日の講義講義で学ぶ内容 変数とは 変数の使い方 キーボード入力の仕方 変 数 変 数 一時的に値を記憶させておく機能 変数は 型 ( データ型 ) と識別子をもちます 2 型 ( データ型 ) 変数に記憶する値の種類変数の型は 記憶できる値の種類と範囲

kiso2-06.key

新・明解C言語 実践編

Microsoft PowerPoint - 13th.ppt [互換モード]

Microsoft PowerPoint - 計算機言語 第7回.ppt

kiso2-09.key

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

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

Microsoft Word - Training10_プリプロセッサ.docx

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 >=

DA100データアクイジションユニット通信インタフェースユーザーズマニュアル

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

JavaプログラミングⅠ

Microsoft Word - no15.docx

For_Beginners_CAPL.indd

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

P02.ppt

1:. Csmith,, (B!=0? A/B : A),.,., Orange3 [3], Orange4 [4],., Csmith., Csmith GCC LLVM.,,., Orange3, Orange4,, if for., Orange4, C, Csmith.,., if, for

C ( ) C ( ) C C C C C 1 Fortran Character*72 name Integer age Real income 3 1 C mandata mandata ( ) name age income mandata ( ) mandat

講習No.12

Microsoft Word - Sample_CQS-Report_English_backslant.doc

untitled

2008 IIA (program) pro(before)+gram(write) (artificial language) (programming languege) (programming) (machine language) (assembly language) ( )

Microsoft PowerPoint - 2.ppt [互換モード]

プログラミング実習I

P06.ppt

K227 Java 2

1-4 int a; std::cin >> a; std::cout << "a = " << a << std::endl; C++( 1-4 ) stdio.h iostream iostream.h C++ include.h 1-4 scanf() std::cin >>

PowerPoint プレゼンテーション

明解Javaによるアルゴリズムとデータ構造

Microsoft Word - 3new.doc

ex01.dvi

ex12.dvi

JavaプログラミングⅠ

森林航測87号

SuperH RISC engine C/C++ コンパイラ Ver.7 不具合内容 - 過去のお知らせ SuperH RISC engine C/C++ コンパイラ Ver.7 台における不具合内容を以下に示します のチェックツールをルネサスエレクトロニクス株式会社のホームページ

I J

新たな基礎年金制度の構築に向けて

問 2 ( 型変換 ) 次のプログラムを実行しても正しい結果が得られない 何が間違いかを指摘し 正しく修正せよ ただし int サイズが 2 バイト long サイズが 4 バイトの処理系での演算を仮定する #include <stdio.h> int main( void ) { int a =

3-4 switch 文 switch 文は 単一の式の値によって実行する内容を決める ( 変える ) 時に用いる 例えば if 文を使って次のようなプログラムを作ったとする /* 3 で割った余りを求める */ #include <stdio.h> main() { int a, b; } pri

(300, 150) 120 getchar() HgBox(x, y, w, h) (x, y), w, h #include <stdio.h> #include <handy.h> int main(void) { int i; double w, h; } HgO

ohp03.dvi

Transcription:

( ) ( ) ( ) A B C D E F G H I J K L M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z 0 1 2 3 4 5 6 7 8 9 (OUS) 9 26 1 / 28

( ) ( ) ( ) A B C D Z a b c d z 0 1 2 9 (OUS) 9 26 2 / 28

( ) for (data Data ) (OUS) 9 26 3 / 28

( ) ( ) kadai 0510kadai ( ) kadai0510 kadai-0510 ( - ) FOR ( ) fime_name ( ) FileName ( ) md MaxData MinData MonthData (OUS) 9 26 4 / 28

C auto double int struct break else long switch case enum register typedef char extern return union const float short unsigned continue for signed void default goto sizeof volatile do if static while include stdioh printf scanf (OUS) 9 26 5 / 28

1 #include <stdioh> 2 int main(void){ 3 int auto; 4 auto=5; 5 printf("auto %d Y=n",auto); 6 return 0; 7 } auto (OUS) 9 26 6 / 28

C dt=100; dt 100 (= ) (OUS) 9 26 7 / 28

10 8 16 (u, U, l, L, LL) (a 30 ) a=30; a=036; a=0x1e; a=30u;! LL(long long) L (OUS) 9 26 8 / 28

e E (a 123456 b 0000123 ) a=123456; a=123456e+02; b=0000123; b=123e-04;! c=100f c=1000f 000000000000123 (OUS) 9 26 9 / 28

( A ) A A ( (1) (2) ) int c; c= A ; // (1) c=65; // (2) (OUS) 9 26 10 / 28

( ) 1 #include <stdioh> 2 void main(void){ 3 char c; 4 int n; 5 c= A ; 6 n=5; 7 printf("%c %d %c Y=n",c,n,c+n); 8 } A 5 F (OUS) 9 26 11 / 28

( : moji )! C a="moji" 8 char txt[10]="hello"; // txt "Hello" strcpy(txt, "Hello"); // txt "Hello" (OUS) 9 26 12 / 28

printf() Y=n Y= n ( ) Y=n ( ), Y=t ( ), Y=xhh (16 ) a=0x32 a= Y=x32 2 (OUS) 9 26 13 / 28

( ) printf("abcy=tklmy=nnopy=nsy=tty=tuy=n"); printf("y=tmnoy=n"); printf("123456y=t7890y=n"); printf("1234567y=t890y=n"); printf("12345678y=t90y=n"); abc klm nop s t u mno 123456 7890 1234567 890 12345678 90 (OUS) 9 26 14 / 28

(16 ) printf("%dy=n", Y=x30 ); 48 16 30 10 (%d) (OUS) 9 26 14 / 28

if(i<=3286){ 3286 if(i<=maxdata){ #define MaxData 3286 ( ; ) MaxData 3286 (OUS) 9 26 15 / 28

(1 max ) 1 #include <stdioh> 2 #define max 10 3 int main(void){ 4 int i, sum=0, pro=1, sum2=0; 5 for(i=1;i<=max;i++) 6 sum+=i; 7 for(i=1;i<=max;i++) 8 pro*=i; 9 for(i=1;i<=max;i++) 10 sum2+=i*i; 11 printf("1 %d,, Y=n",max); 12 printf("%d, %d, %dy=n",sum,pro,sum2); 13 return 0; 14 } (OUS) 9 26 16 / 28

1 10,, 55, 3628800, 385 (OUS) 9 26 17 / 28

( ) 1 #include <stdioh> 2 #define wa(a,b) ((a)+(b)) 3 #define pri(dt) printf("%dy=n",dt) 4 5 int main(void){ 6 int c; 7 c=wa(10,20); 8 pri(c); 9 return 0; 10 } (OUS) 9 26 18 / 28

30 (OUS) 9 26 19 / 28

const const const int dt=100; dt 100 // (OUS) 9 26 20 / 28

printf II 22 printf printf(, ); : abc, 123,,, Y=t, Y=n : %d %s [%+ ] (OUS) 9 26 21 / 28

%o 8 %d 10 %x 16 ( ) %X 16 ( ) %ld long 10 %f %e ( ) %E ( ) %c %s %p (OUS) 9 26 22 / 28

a=1;b=2;c=3; printf(" %d, %d, %d Y=n",a,b,c); 1, 2, 3 (OUS) 9 26 23 / 28

% (OUS) 9 26 24 / 28

%d 10 %8d 8 10 0 %08d 8 10 0 %-8d 8 10 %f %102f (, 1 ) 10 2 (OUS) 9 26 25 / 28

(, 1) #include<stdioh> void main(void){ int a=2,b=13,c=321; printf("a=%4d,y=n",a); printf("b=%4d,y=n",b); printf("c=%04d,y=n",c); } a= 2, b= 13, c=0321, (OUS) 9 26 26 / 28

(, 2) #include<stdioh> void main(void){ int a=20; double da=-123456789; printf("a=%8d,y=na=%08d,y=na=%-8d,y=n",a,a,a); printf("da=%fy=n",da); printf("da=%104fy=n",da); printf("da=%104fy=n",da*(-1)); } (OUS) 9 26 27 / 28

a= 20, a=00000020, a=20, da=-12345679 da= -123457 da= 123457 3 (a ) 8 3 (da ) ( )10 10 (OUS) 9 26 28 / 28