c_cpp 测试

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了c_cpp 测试相关的知识,希望对你有一定的参考价值。

daniel_page1
Sep 26, 2018 1:30pm
FLAG
#include <iostream>
#include "TAXRATES.h"

using namespace std;

double wage;
double* wagePointer;

double InputWage();
void WageChecker();
double CalculateYearly(double* w);

int main()
{
    wagePointer = &wage;
    InputWage();
    WageChecker();
    return 0;
}

double InputWage(){

    cout << "How much do you get paid" << endl;
    cin >> *wagePointer;
    cout << "You get paid " << *wagePointer << endl;

    return 0;
}

void WageChecker(){
    cout << "How often do you get paid yearly = 0 & monthly = 1 " << endl;
    int checker;
    cin >> checker;
    if(checker == YEARLY){
        cout << "Calculating Yearly";
        cout << CalculateYearly(wagePointer);
    }
    else if(checker == MONTHLY){
        cout << "Calculating Monthly";
    }
    else{
        cout << "Please type 0 r 1";
    }
}

double CalculateYearly(double* w){
    return  (*w - BR_PERSONAL_ALLOWANCE) / 100 * BR_TAX_RATE;
}


以上是关于c_cpp 测试的主要内容,如果未能解决你的问题,请参考以下文章

c_cpp 测试

c_cpp 测试2.cpp

c_cpp 能力测试

c_cpp 测试

c_cpp 线程测试

c_cpp 氙的样品测试