Click here to Skip to main content
15,898,893 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: PostMessage(): Debug vs. Release Pin
Michael Dunn25-Jan-04 18:37
sitebuilderMichael Dunn25-Jan-04 18:37 
GeneralRe: PostMessage(): Debug vs. Release Pin
reymano26-Jan-04 5:40
reymano26-Jan-04 5:40 
GeneralMFC - Displaying time in dialog Pin
Ashman25-Jan-04 12:04
Ashman25-Jan-04 12:04 
GeneralRe: MFC - Displaying time in dialog Pin
Maximilien25-Jan-04 12:47
Maximilien25-Jan-04 12:47 
GeneralRe: MFC - Displaying time in dialog Pin
toxcct25-Jan-04 22:26
toxcct25-Jan-04 22:26 
GeneralKernel32.dll DBG error Pin
TriggerJ25-Jan-04 11:21
TriggerJ25-Jan-04 11:21 
GeneralRe: Kernel32.dll DBG error Pin
toxcct25-Jan-04 22:07
toxcct25-Jan-04 22:07 
GeneralRe: Kernel32.dll DBG error Pin
TriggerJ26-Jan-04 2:25
TriggerJ26-Jan-04 2:25 
It seems to be shutting down every time a calculation is being made. Any suggestions?

Here is the program. Maybe I just coded something wrong...I dunno. Thanks for the help though.

//Write a program that computes the weekly pay of managers, hourly
//employee's, commission employee's and piece workers.

#include <iostream>
#include <cstdlib>
#include <iomanip>

using namespace std;

int main()
{
int payroll;
float manager, hourly, commission, piecew;
double numhours, pieces;

cout<< "Enter a payroll code from below: \n";
cout<<"\n 1 for Managers: ";
cout<<"\n 2 for Hourly Employees: ";
cout<<"\n 3 for Commission Employees: ";
cout<<"\n 4 for Piece Workers: ";
cin>>payroll;

switch (payroll)
{
case 1:
cout<<"\nEnter the fixed weekly salary for managers: ";
cin>>manager;
cout<<"\nThe weekly salary for your managers is: "<<manager<<endl;
break;

case 2:
cout<<"\nenter="" the="" fixed="" hourly="" wage:="" ";
cin="">>hourly;
cout<<"\nEnter the number of hours worked: ";
cin>>numhours;

if (numhours<=40)
{
cout<<"\nThe weekly wage for your hourly employee's is: ";
cout<<(hourly*40)<<endl;
}
else
{
cout<<"\nthe weekly="" wage="" for="" your="" hourly="" employee's="" is:="" ";
cout<<((hourly*40)+((numhours-40)*(1.5*hourly)))<<endl;
}
break;

case="" 3:
{
cout<<"\nenter="" the="" gross="" sales="" commission="" employee's:="" ";
cin="">>commission;
cout<<"\nThe weekly wage for your commission employee's is: ";
cout<<(250+(0.057*commission))<<endl;
}
break;

case 4:
{
cout<<"\nenter="" the="" fixed="" salary="" per="" piece="" produced:="" ";
cin="">>piecew;
cout<<"\nEnter the amount of pieces produced by the worker: ";
cin>>pieces;
cout<<"\nThe weekly wage for your piece workers is: ";
cout<<(piecew*pieces)<
GeneralRe: Kernel32.dll DBG error Pin
toxcct27-Jan-04 1:44
toxcct27-Jan-04 1:44 
Questionsolving Brouncker's fraction expansion? Pin
a_hyams25-Jan-04 11:12
a_hyams25-Jan-04 11:12 
AnswerRe: solving Brouncker's fraction expansion? Pin
ZoogieZork26-Jan-04 2:30
ZoogieZork26-Jan-04 2:30 
GeneralSet window title (get rid of &quot;untitled&quot;) Pin
TolTol25-Jan-04 10:29
TolTol25-Jan-04 10:29 
GeneralRe: Set window title (get rid of &quot;untitled&quot;) Pin
Michael Dunn25-Jan-04 18:49
sitebuilderMichael Dunn25-Jan-04 18:49 
GeneralRe: Set window title (get rid of &quot;untitled&quot;) Pin
TolTol25-Jan-04 23:13
TolTol25-Jan-04 23:13 
GeneralWindows Hooks Pin
NMiceli25-Jan-04 10:05
NMiceli25-Jan-04 10:05 
QuestionHow to get icon given a file extension? Pin
Artem Moroz25-Jan-04 9:50
Artem Moroz25-Jan-04 9:50 
AnswerRe: How to get icon given a file extension? Pin
Michael Dunn25-Jan-04 18:51
sitebuilderMichael Dunn25-Jan-04 18:51 
QuestionHow to USE C++ code in VB ?? Pin
ponka12825-Jan-04 9:30
ponka12825-Jan-04 9:30 
AnswerRe: How to USE C++ code in VB ?? Pin
David Crow26-Jan-04 2:44
David Crow26-Jan-04 2:44 
Generalweb plugin required Pin
Member 84034825-Jan-04 8:11
Member 84034825-Jan-04 8:11 
GeneralQuestion about CDateTimeCtrl Pin
Mukkie25-Jan-04 7:34
Mukkie25-Jan-04 7:34 
GeneralRe: Question about CDateTimeCtrl Pin
toxcct25-Jan-04 21:59
toxcct25-Jan-04 21:59 
GeneralEasy question on CString Pin
Anonymous25-Jan-04 6:51
Anonymous25-Jan-04 6:51 
GeneralRe: Easy question on CString Pin
Jörgen Sigvardsson25-Jan-04 6:54
Jörgen Sigvardsson25-Jan-04 6:54 
GeneralRe: Easy question on CString Pin
toxcct25-Jan-04 21:36
toxcct25-Jan-04 21:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.