SlideShare a Scribd company logo
1 of 3
แนวข้อสอบ
การหาค่าของเกรด
1 #include <stdio.h>
2 #include <conio.h>
3 int main()
4 {
5 int score;
6 printf("nenter score : ");
7 scanf("%d",&score);
8 if(score > 90){
9 printf("Grad G");
10 } else if (score > 75) {
11 printf("Grad PD");
12 } else if (score >=60) {
13 printf("Grad P");
14 } else if (score <60) {
15 printf("Grad F");
16 }
17 getch();
18 }
เลขคี่
1 #include <stdio.h>
2 #include <conio.h>
3 main()
4 {
5 int i=9,sum=0;
6 while(i<=29){
7 sum +=i;
8 i-=9;
9 }
10 printf("sum of 9+29:%dn",sum);
11 getch();
12 }
เลขวงวน
1 #include <stdio.h>
2 #include <conio.h>
3 main()
4 {
5 int i=0;
6 while(i<=3){
7 printf("COMPUTER.n");
8 printf("KSU.n");
9 i++;
10 }
11 printf("COMPUTER.n");
12 printf("COMPUTER.n");
13 printf("COMPUTER.n");
14
15 getch();
16 }

More Related Content

Viewers also liked (9)

Green Book 4
Green Book 4Green Book 4
Green Book 4
 
Mapa mental desviacion social dessiree gomez
Mapa mental desviacion social dessiree gomezMapa mental desviacion social dessiree gomez
Mapa mental desviacion social dessiree gomez
 
документи
документидокументи
документи
 
виконання міського бюджету чернігова
виконання міського бюджету черніговавиконання міського бюджету чернігова
виконання міського бюджету чернігова
 
Dead Men's Path
Dead Men's PathDead Men's Path
Dead Men's Path
 
Motivation theories
Motivation theoriesMotivation theories
Motivation theories
 
Digital marketing campaign
Digital marketing campaignDigital marketing campaign
Digital marketing campaign
 
Metodologías de desarrollo ágiles: Scrum, XP
Metodologías de desarrollo ágiles: Scrum, XPMetodologías de desarrollo ágiles: Scrum, XP
Metodologías de desarrollo ágiles: Scrum, XP
 
HUMAN RELATION AND ORGANISATIONAL BEHAVIOUR
HUMAN RELATION AND ORGANISATIONAL BEHAVIOURHUMAN RELATION AND ORGANISATIONAL BEHAVIOUR
HUMAN RELATION AND ORGANISATIONAL BEHAVIOUR
 

แนวข้อสอบ