The Philippine Electronics and Technology Forum
July 30, 2010, 05:52:33 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  

Pages: [1]   Go Down
  Print  
Author Topic: help c++ program  (Read 104 times)
ganja
Size AAA Battery
*

Pogi/Ganda Points: 0
Offline Offline

Posts: 6


« on: February 17, 2010, 02:44:19 PM »

write a program that will display the ff:

Status code (C/c,T/t,P/p)):
enter the employee name:
enter the no.of hours:
enter the overtime hours:

Employee Neme:
Gross Salary:
Net Pay:
Status:

*status      Status      Rate per Hour
C or c      casual      100.00
T or t       Temporary   200.00
P or p      Permanent     300.00

gross pay= Hours worked * Rate per Hour
Overtime pay= Overtime hour * 100
net pay= Gross Pay + Overtime Pay
Logged
The Philippine Electronics and Technology Forum
« on: February 17, 2010, 02:44:19 PM »

 Logged
stepipai
Size AA Battery
**

Pogi/Ganda Points: 4
Offline Offline

Gender: Female
Posts: 71


...life's boring without challenges...


« Reply #1 on: March 08, 2010, 09:34:00 AM »

#include<stdio.h>
*include<conio.h>

char code;
char name[30];

int hour, overtime;
int grosspay, overtimepay,netpay;

main(){
printf("Enter Employee's Code: ");
scanf("%s", &code);

printf("\nEnter Employee's name: ");
getsline(name);

printf("\nEnter Number of Hours: ");
scanf("%d", &hour);

printf("\nEnter number of Overtime: ")
scanf("%d", &overtime);


switch (code){
case c: cas C:
{
grosspay=hour*100;
overtimepay=overtime*100;
netpay=grosspay+overtimepay;

printf("Employee's name: %s", name);
printf("Gross salary: %d", grosspay);
printf("Net Pay: %d", netpay);
printf("Status: Casual");
}


case t: case T:
{
grosspay=hour*200;
overtimepay=overtime*200;
netpay=grosspay+overtimepay;

printf("Employee's name: %s", name);
printf("Gross salary: %d", grosspay);
printf("Net Pay: %d", netpay);
printf("Status: Temporary");
}

case p: cas P:
{
grosspay=hour*300;
overtimepay=overtime*300;
netpay=grosspay+overtimepay;

printf("Employee's name: %s", name);
printf("Gross salary: %d", grosspay);
printf("Net Pay: %d", netpay);
printf("Status: Permanent");
}




}


}

}


}


pseudo code lng po yan and I expect errors pa... wala kasi devC didto sa library na internet section...
edit mo lng if may errors ha,
Logged

...I'm thankful each and every day, coz I found you...
The Philippine Electronics and Technology Forum
   

 Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  


Related Topics
Subject Started by Replies Views Last post
Sample program running program plus circuit please !! « 1 2 »
Microcontroller/Microprocessor Unit Projects and Programming
Siramiko 31 3747 Last post August 27, 2008, 10:39:14 PM
by paranz
elp lan sa program
Love Threads
mark_22creus 0 296 Last post July 27, 2009, 10:39:23 PM
by mark_22creus
c++ program
Computer Software
fran2no 8 696 Last post October 21, 2009, 03:03:27 PM
by ┌[٠KaiZeR]٨[gigz09٠]┐
what program to use in program an sms module??
Microcontroller/Microprocessor Unit Projects and Programming
Nokia 3 576 Last post November 28, 2009, 10:25:16 PM
by kelvinblank
help c++ program
All about ElectronicsLab.PH
ganja 2 209 Last post February 17, 2010, 04:23:09 PM
by ┌[٠KaiZeR]٨[gigz09٠]┐
help c++ program
General Electronics and Technology Discussion
ganja 0 98 Last post February 17, 2010, 02:38:35 PM
by ganja
help c++ program
Computer Software
ganja 0 91 Last post February 17, 2010, 02:39:41 PM
by ganja
Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!