2011年11月22日 星期二

100設計一甲_week11

example1.c
#include<stdio.h>
int main(){
    printf("hello c!\n");
    return 0;
}
example2.c
#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
#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
依次序印出
*/

沒有留言:

張貼留言