導入基礎演習.ppt

Similar documents

Informatics 2014

超初心者用

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

Informatics 2015

kiso2-03.key

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

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

Informatics 2010.key

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

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

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

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

tuat1.dvi

untitled

2006年3月8日

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

Microsoft PowerPoint - C_Programming(3).pptx

C

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

6-1

C言語入門

C C UNIX C ( ) 4 1 HTML 1

(ver. 1.3 (2018) ) yacc 1 1 yacc yacc (Yet Another Compiler Compiler) UNIX yacc yacc y *.y yacc ) yacc *.tab.h *.tab.c C C yacc yacc UNIX yacc bison 2

Cプログラミング1(再) 第2回

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

P05.ppt

P06.ppt

A/B (2018/06/08) Ver kurino/2018/soft/soft.html A/B

main


pptx

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

r07.dvi

Int Int 29 print Int fmt tostring 2 2 [19] ML ML [19] ML Emacs Standard ML M M ::= x c λx.m M M let x = M in M end (M) x c λx.

ohp07.dvi

10/ / /30 3. ( ) 11/ 6 4. UNIX + C socket 11/13 5. ( ) C 11/20 6. http, CGI Perl 11/27 7. ( ) Perl 12/ 4 8. Windows Winsock 12/11 9. JAV

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

1st-session key

untitled

(CC Attribution) Lisp 2.1 (Gauche )

1.ppt

Emacs ML let start ::= exp (1) exp ::= (2) fn id exp (3) ::= (4) (5) ::= id (6) const (7) (exp) (8) let val id = exp in

WinHPC ppt

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 )

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

RHEA key

listings-ext

2004

Report#2.docx

2

ex01.dvi

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

1) OOP 2) ( ) 3.2) printf Number3-2.cpp #include <stdio.h> class Number Number(); // ~Number(); // void setnumber(float n); float getnumber();

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

USB ID TA DUET 24:00 DUET XXX -YY.c ( ) XXX -YY.txt() XXX ID 3 YY ID 5 () #define StudentID 231

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


プログラミング 1 プログラミング演習 I プログラミングの重要性 プログラミング言語をなぜ勉強するのか? 世界的に有名な日本のある IT 企業の社長が求める人材に 必要なスキル 1. プログラミング (C 言語 ) 2. 数学 3. 英語 #-1 #-2 プログラミングはどこで使えるのか? 1.

10/ / /30 3. ( ) 11/ 6 4. UNIX + C socket 11/13 5. ( ) C 11/20 6. http, CGI Perl 11/27 7. ( ) Perl 12/ 4 8. Windows Winsock 12/11 9. JAV

30

FMV-TEOシリーズ(2008年6月版)製品カタログ

Microsoft PowerPoint L02-Introduction-students ( )

2 Eclipse 2.1 Eclipse 1. Eclipse 2. 3 ( 4) E:Yworkspace OK 3 Eclipse 4 3. Eclipse 5 5 Eclipse Eclipse 2. 7 C 2

1 2 01

joho09.ppt

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

d-00

program.dvi

untitled

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-

Microsoft Word J.^...O.|Word.i10...j.doc

卒 業 研 究 報 告.PDF

c-all.dvi

ohp1.dvi

Microsoft Word - 3new.doc

GPLとWordPress

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

1 # include < stdio.h> 2 # include < string.h> 3 4 int main (){ 5 char str [222]; 6 scanf ("%s", str ); 7 int n= strlen ( str ); 8 for ( int i=n -2; i

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

橡Taro9-生徒の活動.PDF

PowerPoint Presentation

haskell.gby

XMPによる並列化実装2

,,,,., C Java,,.,,.,., ,,.,, i

(Basic Theory of Information Processing) Fortran Fortan Fortan Fortan 1

坊っちゃん

橡Pro PDF

ex01.dvi

r08.dvi

Report#2.docx

OpenMP (1) 1, 12 1 UNIX (FUJITSU GP7000F model 900), 13 1 (COMPAQ GS320) FUJITSU VPP5000/64 1 (a) (b) 1: ( 1(a))

P03.ppt

K227 Java 2



株式会社日清製粉グループ本社 第158期中間事業報告書

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

‚æ4›ñ

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

Transcription:

Multi-paradigm Programming Functional Programming Scheme Haskell ML Scala X10 KL1 Prolog Declarative Lang. C Procedural Lang. Java C++ Python Object-oriented Programming

/ (root) bin home lib 08 09 lab7 hatto hatto hatto

.c program.c emacs cc program.c a.out./a.out

main() printf("hello World!\n");

main() printf("hello World!\n"); Hello World!

main() printf("hello World!\n"); \n

Hello Japan! Hello Asia! Hello World!

main() printf("hello Japan!\nHello Asia!\nHello World!"); main() printf("hello Japan!\n"); printf("hello Asia!\n"); printf("hello World!\n");

main() printf("hello Japan! Hello Asia! Hello World!");

main() printf( %d\n, 2+3);

main() printf( %d %d\n, 2+3, 3+4);

float tax(int x); main() float z; z = tax(1000); printf(" %.0f \n", z); float tax(int x) return(x * 0.05);

float tax(int x); main() float z; z = tax(1000); printf(" %.0f \n", z); float tax(int x) return(x * 0.05);.h

float tax(int x); main() float z; z = tax(1000); printf(" %.0f \n", z); float tax(int x) return(x * 0.05); stdio.h printf.h printf(. );

float tax(int x); main() float z; z = tax(1000); printf(" %.0f \n", z); float tax(int x) return(x * 0.05);.h stdio.h printf printf(. );

float tax(int x); main() float z; z = tax(1000); printf(" %.0f \n", z); float tax(int x) return(x * 0.05);

float tax(int x); main() float z; z = tax(1000); printf(" %.0f \n", z); float tax(int x) return(x * 0.05); return

float tax(int x); main() float z; = z = tax(1000); printf(" %.0f \n", z); float tax(int x) return(x * 0.05);

float tax(int x); main() float z; z = tax(1000); tax z printf(" %.0f \n", z); float tax(int x) return(x * 0.05);

float tax(int x); float tax(int x) return(x * 0.05); main() float z; z = tax(1000); printf(" %.0f \n", z);

float tax(int x); main() float z; z = tax(1000); printf(" %.0f \n", z); float tax(int x) // return(x * 0.05);

z = 15; printf("the number is %.1f\n", z);

if int total = 14; int absence = 3; if (absence <= (total / 4)) printf( You made it! n ); int total = 14; int absence = 3; int report = 7; if ((absence <= (total / 4)) && (report >= 7)) printf( You made it! n );

if else int total = 14; int absence = 3; if (absence <= (total / 4)) printf( You made it! n ); else printf( See you next year! n );

main() int currenttime = 18; if(currenttime < 12) printf("good morning!\n"); else if (currenttime? < 18) printf("good afternoon!\n"); else printf("good evening!\n");

main() int currenttime = 18; if(currenttime < 12) printf("good morning!\n"); else if (currenttime < 18) printf("good afternoon!\n"); else printf("good evening!\n");

for ; ; main() int seed = 5; int fact = 1; int i; for(i = seed; 0 < i; i- - ) fact = fact * i; printf("result: %d\n", fact);

(define fact (lambda (n) (if (= n 0) 1 (* (fact (- n 1)) n)))) int factorial(int x); int main() int seed = 5; printf("result: %d\n", factorial(seed)); int factorial(int x) if (x == 0) return 1; else return (factorial(x- 1)*x);

1: 2: 3: main() 4: 5: int total = 14; int absence = 3; int report = 6; 6: 7: if ((absence <= (total / 4)) && (report >= 7)) 8: printf("you made it!"); 9: else 10: printf("see you next year!"); 11: 12: prog6.c: In function main : prog6.c:12: error: expected declaration or statement at end of input prog6.c:12: error: expected declaration or statement at end of input