Archive for 十月 15th, 2010

20101015P

(A)輸入說明(B)字元,字元陣列及字串的說明

(A)輸入說明(B)字元,字元陣列及字串的說明

從演算法變成程式敘述的說明

從演算法變成程式敘述的說明

作業四說明

作業四說明

bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark

Tags: , ,

#include <stdio.h>
int main(int argc, char *argv[])
{
    int income, tax;
    printf("Please input net income:"); 
 
    scanf("%d", &income);  
 
    if ( income <=500000)
       tax = income * 5 / 100;
    else
       tax = income *12 / 100 - 35000;
 
    printf("Net income=%d Tax=%d", income, tax);
    return 0;
}

bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark

Tags: , ,