2011年11月22日 星期二

100設計一甲_week11

example1.c
1
2
3
4
5
#include<stdio.h>
int main(){
printf("hello c!\n");
return 0;
}
example2.c
1
2
3
4
5
6
7
8
9
#include<stdio.h>
int main(){
printf("hello c!\n");
int i=0;
for(i=0;i<10;i++){
printf("%d\n",i);
}
return 0;
}
example3.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include<stdio.h>
int main(){
int i=0;
for(i=0;i<=100;i++){
if(i<=40){
printf("C score:%d\n",i);
}
else if(i<=70){
printf("B score:%d\n",i);
}
else{
printf("A score:%d\n",i);
}
}
return 0;
}
/*
班級從1到最後一號
假如號碼是偶數 後面請加even
假如號碼是奇數 後面請加odd
依次序印出
*/

沒有留言:

張貼留言