P02.ppt

Similar documents
新版明解C言語入門編

P05.ppt

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

P03.ppt

P06.ppt

PowerPoint Presentation

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

main

解きながら学ぶC言語

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

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

初歩のC言語ターミナル_2014_May.pages


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


Microsoft Word - no15.docx

17 1. strucr Potter ( ) Harry Potter and the Philosopher s Stone 1997 English Title : Harry Potter and the Philosopher s Stone : : 1997 #include<stdio

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

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

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

£Ã¥×¥í¥°¥é¥ß¥ó¥°(2018) - Âè11²ó – ½ÉÂꣲ¤Î²òÀ⡤±é½¬£² –

gengo1-11

ex14.dvi

£Ã¥×¥í¥°¥é¥ß¥ó¥°ÆþÌç (2018) - Â裱£²²ó ¡Ý½ÉÂꣲ¤Î²òÀ⡤±é½¬£²¡Ý

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

‚æ4›ñ

新版明解C言語 実践編

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

Microsoft Word - no14.docx

演算増幅器

double 2 std::cin, std::cout 1.2 C fopen() fclose() C++ std::fstream 1-3 #include <fstream> std::fstream fout; int a = 123; fout.open( "data.t

1 4 2 EP) (EP) (EP)

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

c-all.dvi

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

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

Microsoft PowerPoint - lec4.ppt

tuat1.dvi

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

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

2004

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

kiso2-09.key

gengo1-2

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

#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

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

kiso2-06.key

1 ( )

untitled

1990 IMO 1990/1/15 1:00-4:00 1 N N N 1, N 1 N 2, N 2 N 3 N 3 2 x x + 52 = 3 x x , A, B, C 3,, A B, C 2,,,, 7, A, B, C

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

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

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

C言語7

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

joho09.ppt

Excel97関数編


<4D F736F F D20438CBE8CEA8D758DC03389F0939A82C282AB2E646F63>


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

橡Taro9-生徒の活動.PDF

EPSON VP-1200 取扱説明書

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

untitled

ネットショップ・オーナー2 ユーザーマニュアル

/9/ ) 1) 1 2 2) 4) ) ) 2x + y 42x + y + 1) 4) : 6 = x 5) : x 2) x ) x 2 8x + 10 = 0

EPSON エプソンプリンタ共通 取扱説明書 ネットワーク編

ありがとうございました

EPSON エプソンプリンタ共通 取扱説明書 ネットワーク編

公務員人件費のシミュレーション分析


橡hashik-f.PDF

198


1

新婚世帯家賃あらまし

05[ ]戸田(責)村.indd

高等学校学習指導要領

高等学校学習指導要領

1 (1) vs. (2) (2) (a)(c) (a) (b) (c) 31 2 (a) (b) (c) LENCHAR

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

無印良品のスキンケア

プログラミング実習I

PowerPoint Presentation

untitled

/*Source.cpp*/ #include<stdio.h> //printf はここでインクルードして初めて使えるようになる // ここで関数 average を定義 3 つの整数の平均値を返す double 型の関数です double average(int a,int b,int c){

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

ゲームエンジンの構成要素

PSCHG000.PS

θ (t) ω cos θ(t) = ( : θ, θ. ( ) ( ) ( 5) l () θ (t) = ω sin θ(t). ω := g l.. () θ (t) θ (t)θ (t) + ω θ (t) sin θ(t) =. [ ] d dt θ (t) ω cos θ(t

kiso2-03.key

Microsoft PowerPoint - C1(演算と変数).ppt

18 ( ) I II III A B C(100 ) 1, 2, 3, 5 I II A B (100 ) 1, 2, 3 I II A B (80 ) 6 8 I II III A B C(80 ) 1 n (1 + x) n (1) n C 1 + n C

Ruby Ruby ruby Ruby G: Ruby>ruby Ks sample1.rb G: Ruby> irb (interactive Ruby) G: Ruby>irb -Ks irb(main):001:0> print( ) 44=>



人事行政の運営状況等の公表(平成19年12月)(PDF)


Transcription:

int If 2 1

,,, 3 a + b ab a - b ab a * b ab a / b ab a % b ab a + b 4 2

list0201.c /, % /*/ int vx, vy; puts(""); printf("vx"); scanf("%d", &vx); printf("vy"); scanf("%d", &vy); printf("vx + vy = %d\n", vx + vy); printf("vx - vy = %d\n", vx - vy); printf("vx * vy = %d\n", vx * vy); printf("vx / vy = %d\n", vx / vy); printf("vx %% vy = %d\n", vx % vy); 5 / 5 / 3 1, 3 / 5 0 % 5 % 3 2, 3 % 5 3 (int)(int) 6 3

int sin, cos 7 heikin_int.c /* 2/ int sugaku; int english; int heikin; printf( ); scanf( %d, &sugaku); printf( ); scanf( %d, &sugaku);, / (), heikin = (sugaku + english) / 2; /* / printf( %d, heikin ); return(0); 8 4

heikin_dbl.c /* 2/ int sugaku; int english; double heikin; printf( ); scanf( %d, &sugaku); printf( ); scanf( %d, &sugaku); int double heikin = (sugaku + english) / 2.0; /* / printf( %f, heikin ); 2 2.0 return(0); %d %f 9 C int doublefloat int sugaku; int () sugaku double heikin; double heikin 10 5

int double printf printf( %d, no ); printf( %f, no ); scanf scanf( %d, &no ); scanf( %lf, &no ); %lf () 11 list0207.c doubleprintf, scanf /*/ double vx, vy; /* / puts(""); printf("vx"); scanf("%lf", &vx); printf("vy"); scanf("%lf", &vy); printf("vx + vy = %f\n", vx + vy); printf("vx - vy = %f\n", vx - vy); printf("vx * vy = %f\n", vx * vy); printf("vx / vy = %f\n", vx / vy); 12 6

int(double) 9.99 nx int dx double doubleint 9.99 OK! dx printf 9.000000 double 13 5 / 2 2 int / int int 5.0 / 2.0 2.0 double / double double 5.0 / 2 double / int 5.0 / 2.0 2.5 double / double double 5 / 2.0 int / double 5.0 / 2.0 2.5 double / double double 14 7

int double 15 list0208.cp.29 /* / int n1, n2, n3, n4; double d1, d2, d3, d4; n1 = 5 / 2; n2 = 5.0 / 2.0; n3 = 5.0 / 2; n4 = 5 / 2.0; d1 = 5 / 2; d2 = 5.0 / 2.0; d3 = 5.0 / 2; d4 = 5 / 2.0; printf("n1 = %d\n", n1); printf("n2 = %d\n", n2); printf("n3 = %d\n", n3); printf("n4 = %d\n\n", n4); printf("d1 = %f\n", d1); printf("d2 = %f\n", d2); printf("d3 = %f\n", d3); printf("d4 = %f\n", d4); 16 8

a a (double) 5 5.0 int2.55 2 2 int na, nb; double heikin; na = 40; nb = 45; heikin = (double) (na + nb) / 2 ; 85(int) 85.0(double) 85.0/ 2 (double) / (int) 17 18 9

list0301.c if /* / int vx; printf(""); scanf("%d", &vx); %: if if (vx % 5) puts(""); 19 if (vx % 5 puts(""); if () vx vx%5 = 0 vx vx%5 20 10

list0303.c if int vx; If printf(""); scanf("%d", &vx); if (vx % 5) puts(""); puts( "); 21 If()() if (vx % 5 puts(""); puts( "); 1 2 if () 22 11

C x(int) 38int x + 38 () X38 15 53 38 X % 5 7 5 2 23 2000 2000 2000 A80100B7079C6069D59 24 12

list0306.c /*/ int x1, x2; puts(""); printf(""); scanf("%d", &x1); printf(""); scanf("%d", &x2); if (x1 == x2) puts(""); puts(""); 25 list0307.c /*/ int x1, x2; puts(""); printf(""); scanf("%d", &x1); printf(""); scanf("%d", &x2); if (x1!= x2) puts(""); puts( "); 26 13

== a == b ab10!= a!= b ab10 0 if (x1 == x2) 1 puts(""); puts("");!= 27 2,000 (1)2,000 (2)2,000 (3)2,000 ==!= 3 28 14

list0309.c /*/ intno; printf(""); scanf("%d", &no); if (no == 0) puts("0"); if (no > 0) puts(""); puts(""); 29 if(1 1 if(2) 2 3 If() 11 22, if (no == 0) puts("0"); if (no > 0) puts(""); puts(""); 0 if 30 15

a < b ab10 a > b ab10 a <= b ab10 a >= b ab10 if ( a >= b ) 1 0 31 list0310.c /*2/ int n1, n2; puts(""); printf(""); scanf("%d", &n1); printf(""); scanf("%d", &n2); if (n1 > n2) printf("%d\n", n1); printf("%d\n", n2); 32 16

list0311.c /*2/ int n1, n2, max; puts(""); printf(""); scanf("%d", &n1); printf(""); scanf("%d", &n2); if (n1 > n2) max = n1; max = n2; printf("%d\n", max); 33 list0315.c /*2/ intn1, n2, max, min; puts(""); printf(""); scanf("%d", &n1); printf(""); scanf("%d", &n2); if (n1 > n2) max = n1; min = n2; max = n2; min = n1; 2 2 printf("%d\n", max); printf("%d\n", min); 34 17

1) if (n1 > n2) max = n1; min = n2; printf( ); OK 35 (1)ABAB (2)ABAB (3)AB 36 18

month?? 12 37 &&(and) a && b ab010 (or a b ab010 35 3 <= month <= 5 month >= 3 month <= 5 && 1 1 1 1 0 0 0 1 0 0 0 0 38 19

&&(and) a && b ab010 (or a b ab010 121 month == 12 month == 1 1 1 1 1 0 1 0 1 1 0 0 0 39 list0316.c /*/ int month; /* / printf(""); scanf("%d", &month); if (month >= 3&& month <= 5) puts(""); if (month >= 6 && month <= 8) puts(""); if (month >= 9 && month <= 11) puts(""); if (month == 1 month == 2 month == 12) puts(""); puts("!!\a"); 40 20

scanf(printf) 100 0.9 2. kadai2-1.c printf 100 kadai2-2.c 3if 80A7080B6070C 60D Kadai2-3.c 41 21