204108 com pro for is

15

Post on 07-Jul-2015

606 views

Category:

Education


5 download

DESCRIPTION

ทบทวนก่อนสอบกลางภาค/ปฏิบัติการ

TRANSCRIPT

Page 1: 204108 COM PRO FOR IS
Page 2: 204108 COM PRO FOR IS

Page 3: 204108 COM PRO FOR IS

Page 4: 204108 COM PRO FOR IS

Page 5: 204108 COM PRO FOR IS

› (Data Type and

Input/Output)

› (Operators)

› Control Statement)

› Functions)

Page 6: 204108 COM PRO FOR IS

max

max = 6.00

Page 7: 204108 COM PRO FOR IS

› : printf

› : scanf

› ( ) : if, if-else

› : loop (for, while, do-while, …)

› : sum=sum+1

Page 8: 204108 COM PRO FOR IS

#include<stdio.h>

#include<conio.h>

void main(void)

{

clrscr();

//

getch();

}

Page 9: 204108 COM PRO FOR IS
Page 10: 204108 COM PRO FOR IS

cal_reg

Page 11: 204108 COM PRO FOR IS

Flowchart

› : printf

› : scanf

› ( ) : if, if-else

› : loop (for, while, do-while, …)

› : sum=sum+1

Page 12: 204108 COM PRO FOR IS

#include<stdio.h>

#include<conio.h>

int myFunction(float, char);

//

void main(void)

{

clrscr();

z1 = myFunction(x1, y1)

getch();

}

int myFunction(float x2, char y2)

{

return(z2);

}

myFunction

main

Page 13: 204108 COM PRO FOR IS

STA R T

R ead incom e

tax = ca l_tax(incom e )

tax

STO P

STA R T

R ETU R N am t

cal_tax( incom e )m ain ( )

am t = ?????

STA R T

R ead score

print_grade(score)

STO P

STA R T

R ETU R N

print_grade( score )m ain ( )

grade = ????

Invalid ?

YES

N O

grade

Page 14: 204108 COM PRO FOR IS
Page 15: 204108 COM PRO FOR IS