close

For problem 4#include <cstdlib>#include <iostream>using namespace std;int main(int argc, char *argv[]){ int hours, temp; double salary; cout << "輸入工作時數,計算薪資" << endl; cout << "----------------------" << endl; cout << "工作時數:" << endl; cin >> hours; salary=0; if (hours > 75) { salary = 60*7.5 + 15*7.5*1.25 + (hours-75)*7.5*1.75; } else if (hours > 60) { salary = 60*7.5 + (hours-60)*7.5*1.25; } else { salary = hours*7.5; } cout << "薪資所得:" << salary <<endl; system("pause"); return 0;} .msgcontent .wsharing ul li { text-indent: 0; } 分享 Facebook Plurk YAHOO! .


arrow
arrow
    全站熱搜
    創作者介紹
    創作者 ff71739 的頭像
    ff71739

    貨運

    ff71739 發表在 痞客邦 留言(0) 人氣()