View
609
Download
5
Tags:
Embed Size (px)
DESCRIPTION
ทบทวนก่อนสอบกลางภาค/ปฏิบัติการ
Citation preview
›
›
›
›
›
›
›
›
› (Data Type and
Input/Output)
› (Operators)
› Control Statement)
› Functions)
max
max = 6.00
› : printf
› : scanf
› ( ) : if, if-else
› : loop (for, while, do-while, …)
› : sum=sum+1
#include<stdio.h>
#include<conio.h>
void main(void)
{
clrscr();
//
getch();
}
cal_reg
Flowchart
› : printf
› : scanf
› ( ) : if, if-else
› : loop (for, while, do-while, …)
› : sum=sum+1
#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
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