Jump to content

Please Shoot me....


MountaineerTom

Recommended Posts

Posted

No more programing labs!!!  :(

I hate thinking so much...  ;)

 

/T7AppE02.cpp - displays employee's name, FWT, FICA tax, and net pay//Zane Merva//IS121//Lab 7, ex 2//10-17-01#include <iostream>#include <string>using namespace std;//function prototypesvoid getInput(string &,float &);void calcFedTaxes(float,float,float,float &,float &);void calcNetPay(float,float,float,float &);void displayInfo(string,float,float,float)int main(){	const float FWT_RATE   = float(.2);const float FICA_RATE = float(.08);string name   = "";float salary  = 0.0;float fwtTax  = 0.0; float ficaTax = 0.0;float netPay  = 0.0;//enter input items//calculate taxes//calculate net pay//display name, gross, taxes, and netreturn 0;}	//end of main function//*****program-defined functions*****void getInput(string &name,float &salary){cout << "Please Enter your name";cin >> name;cout << " Please enter your weekly salary";} //end of getInput Functionvoid CalcFedTaxes(float salary,float FET_Rate,float fwtTax,float

 

Posted

Update--here we go

 

//T7AppE02.cpp - displays employee's name, FWT, FICA tax, and net pay//Zane Merva//IS121//Lab 7, ex 2//10-17-01#include <iostream>#include <string>using namespace std;//function prototypesvoid getInput(string &,float &);void calcFedTaxes(float,float,float,float &,float &);void calcNetPay(float,float,float,float &);void displayInfo(string,float,float,float)int main(){	const float FWT_RATE   = float(.2);const float FICA_RATE = float(.08);string name   = "";float salary  = 0.0;float fwtTax  = 0.0; float ficaTax = 0.0;float netPay  = 0.0;//enter input items//calculate taxes//calculate net pay//display name, gross, taxes, and netreturn 0;}	//end of main function//*****program-defined functions*****void getInput(string &name,float &salary){cout << "Please Enter your name";cin >> name;cout << " Please enter your weekly salary";} //end of getInput Functionvoid calcFedTaxes(float salary,float FWT_RATE,float FICA_RATE,float &fwtTax,float &ficaTax){fwtTax= FWT_RATE * salary;ficaTax= FICA_RATE * salary;} //end of CalcFedTaxes Functionvoid calcNetPay(float salary, float fwtTax,float ficaTax,float &netPay){netpay= salary - fwtTax - ficaTax;} //end of calcNetPayvoid displayInfo(string &name,float &fwtTax,float &ficaTax,float &netPay){cout

 

Posted

Right before i try to run it...

 

//T7AppE02.cpp - displays employee's name, FWT, FICA tax, and net pay//Zane Merva//IS121//Lab 7, ex 2//10-17-01#include <iostream>#include <string>using namespace std;//function prototypesvoid getInput(string &,float &);void calcFedTaxes(float,float,float,float &,float &);void calcNetPay(float,float,float,float &);void displayInfo(string,float,float,float)int main(){	const float FWT_RATE   = float(.2);const float FICA_RATE = float(.08);string name   = "";float salary  = 0.0;float fwtTax  = 0.0; float ficaTax = 0.0;float netPay  = 0.0;//enter input itemsgetInput(name,salary);//calculate taxescalcFedTaxes(salary,FWT_RATE,FICA_RATE,fwtTax,ficaTax);//calculate net paycalcNetPay(salary,fwtTax,ficaTax,netPay);//display name, gross, taxes, and netdisplayInfo(name,fwtTax,ficaTax,netPay);cout << "The Program Has Terminated Normally";  // <- For TroubleShootingreturn 0;}	//end of main function//*****program-defined functions*****void getInput(string &name,float &salary){cout << "Please Enter your name";cin >> name;cout << " Please enter your weekly salary";} //end of getInput Functionvoid calcFedTaxes(float salary,float FWT_RATE,float FICA_RATE,float &fwtTax,float &ficaTax){fwtTax= FWT_RATE * salary;ficaTax= FICA_RATE * salary;} //end of CalcFedTaxes Functionvoid calcNetPay(float salary, float fwtTax,float ficaTax,float &netPay){netpay= salary - fwtTax - ficaTax;} //end of calcNetPayvoid displayInfo(string &name,float &fwtTax,float &ficaTax,float &netPay){cout << name << ": You have paied;"<< endl;cout << "FWT Tax Paied= $" << fwtTax << endl;cout << "FICA Tax Paied= $" << ficaTax << endl;cout << "That Makes your NET salary= $" << netPay <<endl;} //end of displayInfo Function

 

Posted

awhhh, crapp......

 

--------------------Configuration: T7appe02 - Win32 Debug--------------------Compiling...T7appe02.cppLinking...T7appe02.obj : error LNK2001: unresolved external symbol "void __cdecl displayInfo(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,float,float,float)" (?displayInfo@@YAXV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@MMM@Z)Debug/T7appe02.exe : fatal error LNK1120: 1 unresolved externalsError executing link.exe.T7appe02.exe - 2 error(s), 0 warning(s)

 

Posted

I kind of remember all that crap.  Made me want to throw my computer out the window everytime I had to do anything with it.

 

Did I ever mention how much I hate computers?  I don't know how the hell some people can major in computer programming when all you do is that BS.

Posted

Your prototype for DisplayInfo is missing the semi-colon on the end.

 

void displayInfo(string,float,float,float)    <-----------

Posted

Quote from scottm, posted on Oct. 17 2001,2:06

Your prototype for DisplayInfo is missing the semi-colon on the end.

 

void displayInfo(string,float,float,float)    <-----------

 

 

 

 

 

sweet!  :(

 

Still getting the same error though.

Posted

Why are you asking us to help you debug that program?  All you have to do is right click on the error, and click on go to error.  Beats the heck out of reading through the entire thing trying to find where you are missing a semi-colon.

 

Besides, that kind of junk shouldn't be allowed on this forum.  I like to forget about C++ when I leave school.  LOL

Posted

Alright!!! It works!!

 

 

#include <iostream>#include <string>using namespace std;//function prototypesvoid getInput(string &,float &);void calcFedTaxes(float,float,float,float &,float &);void calcNetPay(float,float,float,float &);void displayInfo(string,float,float,float);int main(){	const float FWT_RATE   = float(.2);const float FICA_RATE = float(.08);string name   = "";float salary  = 0.0;float fwtTax  = 0.0; float ficaTax = 0.0;float netPay  = 0.0;//enter input itemsgetInput(name,salary);//calculate taxescalcFedTaxes(salary,FWT_RATE,FICA_RATE,fwtTax,ficaTax);//calculate net paycalcNetPay(salary,fwtTax,ficaTax,netPay);//display name, gross, taxes, and netdisplayInfo(name,fwtTax,ficaTax,netPay);cout << "The Program Has Terminated Normally"<< endl;  // <- For TroubleShootingreturn 0;}	//end of main function//*****program-defined functions*****void getInput(string &name,float &salary){cout << "Please Enter your Name: ";getline(cin, name);cout << " Please enter your weekly salary";cin >> salary;cout << endl;} //end of getInput Functionvoid calcFedTaxes(float salary,float FWT_RATE,float FICA_RATE,float &fwtTax,float &ficaTax){fwtTax= FWT_RATE * salary;ficaTax= FICA_RATE * salary;} //end of CalcFedTaxes Functionvoid calcNetPay(float salary, float fwtTax,float ficaTax,float &netPay){netPay= salary - fwtTax - ficaTax;} //end of calcNetPayvoid displayInfo(string name,float fwtTax,float ficaTax,float netPay){cout << name << ": You have payed;"<< endl;cout << "FWT Tax Paied= $" << fwtTax << endl;cout << "FICA Tax Paied= $" << ficaTax << endl;cout << "That Makes your NET salary= $" << netPay <<endl;} //end of displayInfo Function

 

Posted

NEXT!!!  :P   :(

 

 

//T7AppE04.cpp - displays a bonus//Zane Merva//IS121#include <iostream>using namespace std;//function prototypesvoid getSales(float &);void calcBonus(float,float,float &);void displayBonus(float);int main(){	const float RATE = float(.1);//declare variablesfloat sales = 0.0;float bonus = 0.0;//get input itemgetSales(sales);//calculate bonuscalcBonus(sales,RATE,bonus);//display output itemdisplayBonus(bonus);return 0;}	//end of main function//*****program-defined functions*****void getSales(float &sales){cout << "Please Enter your total sales: ";cin >> sales;}void calcBonus(float sales,float RATE,float &bonus){bonus= sales * RATE;}void displayBonus(float bonus){cout << " Congrats! You earned a $" << bonus << " Bonus!" << endl;}

 

Posted

BTW I just noticed that you changed me from a member to "Proud American..."   Sweet, thanks a lot.  It could have been worse, I could be the Forum Fluff Girl (which would be wrong on so many reasons)

Posted

Quote from chevy4x4trucks, posted on Oct. 17 2001,2:01

BTW I just noticed that you changed me from a member to "Proud American..."   Sweet, thanks a lot.  It could have been worse, I could be the Forum Fluff Girl (which would be wrong on so many reasons)

 

Look out, you just gave him some ideas!!  Remember, he has no girlfriend, so he idles away his time doing stuff like this to others.    :(  :P

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Forum Statistics

    250.3k
    Total Topics
    2.7m
    Total Posts
  • Member Statistics

    342,687
    Total Members
    8,960
    Most Online
    3CarSeatDad
    Newest Member
    3CarSeatDad
    Joined
  • Who's Online   4 Members, 0 Anonymous, 715 Guests (See full list)

×
×
  • Create New...