SlideShare a Scribd company logo
1 of 2
1
IN THE NAME OF ALLAH, THE MOST BENEFICENT, THE MOST MERCIFUL
DEPARTMENT OF ICT
CENTRE FOR FOUNDATION STUDIES, IIUM
SEMESTER I, SESSION 2013/2014
SEF1514 ASSIGNMENT 3
Student #1: ……………………………………………………….………. Matric No: ……….….…………
Student #2: ………………………………………………………….…… Matric No: …….….….…………
Group No: ……………..
Write a C program to display net weekly pay for a number of staff. Your program
must use the following user-defined functions:
Use your group number and matric number to name the program file.
e.g. “G101-112345-112346.c
Don’t use global declarations
Declare array for 5 staff names
Declare array for 5 staff week hours worked
Declare array for 5 staff net weekly pay
Declare symbolic constant for hourly waged to be 10 RM
Declare symbolic constant for tax rate to be 0.05
Declare other needed variables
From main() call the following functions to get inputs:
getHours() - to input number of hours worked for 5 staff.
Then main will call:
calculate() – to calculate the net weekly pay for the 5 staff. Use the
following formulas.
Weekly_Pay = week_hours_worked * hourly_wage
Net_Weekly_Pay = Weekly_Pay – (Tax_Rate * Weekly_Pay )
Then main() will pass net weekly pay to:
display()
- to print the Names and calculated net weekly pay
/ 30
2
- Call function FindHighest() to return highest net weekly.
display() will display the highest net weekly pay
- Display name of highest net weekly pay
- Call function FindAvg() to return net weekly pay average.
display() will display the average.
Repeat the whole process until the user decided to stop.
Sample output:
Welcome to Net Weekly Pay Program
Programer 1: Mahmoud Al-Shawabkeh 112345
Programer 2: Azizul Azlan 112346
Group Number: G101
Enter week hours worked for 5 staff: 40
45
40
30
35
The names are Ahmad Ali Omar Fahmi Othman
The net weekly pay is 380 428 380 285 333
Highest net weekly pay is 428
Staff name of highest net weekly pay is Ali
Average of all net weekly pay is 361.2
Do you want to continue? <Y/y/N/n>: N
Press any key to continue . . .

More Related Content

Viewers also liked

Aneurisma cerebral
Aneurisma cerebralAneurisma cerebral
Aneurisma cerebralDiana Lerma
 
Imported from Google Notebook - My first notebook
Imported from Google Notebook - My first notebookImported from Google Notebook - My first notebook
Imported from Google Notebook - My first notebookVũ Nguyên
 
25 de mayo de 1810. candela y anabella
25 de mayo de 1810. candela y anabella25 de mayo de 1810. candela y anabella
25 de mayo de 1810. candela y anabellaGraciela Fernandez
 
M.Sc thesis Presentation
M.Sc thesis PresentationM.Sc thesis Presentation
M.Sc thesis Presentationubongsimon
 
How To Build A LinkedIn Profile by Greg Olson, Growl Mobile Agency
How To Build A LinkedIn Profile by Greg Olson, Growl Mobile AgencyHow To Build A LinkedIn Profile by Greg Olson, Growl Mobile Agency
How To Build A LinkedIn Profile by Greg Olson, Growl Mobile AgencyMaggie Chamberlin Holben, APR
 
Esquema 1 Belén
Esquema 1 BelénEsquema 1 Belén
Esquema 1 Belénbelengleza
 
Uso De Los Rss Y La Sindicacion De Contenidos En La Educacion
Uso De Los Rss Y La Sindicacion De Contenidos En La EducacionUso De Los Rss Y La Sindicacion De Contenidos En La Educacion
Uso De Los Rss Y La Sindicacion De Contenidos En La Educaciondeisysara
 
La educación a distancia vs educaion presencial
La educación a distancia vs educaion presencial La educación a distancia vs educaion presencial
La educación a distancia vs educaion presencial Javier Patiño
 
Recuperación ideal vs. recuperación real en un SRI
Recuperación ideal vs. recuperación real en un SRIRecuperación ideal vs. recuperación real en un SRI
Recuperación ideal vs. recuperación real en un SRIMartha Ivonne Jiménez Homes
 
Word 2010
Word 2010Word 2010
Word 2010DA NY
 

Viewers also liked (14)

Perro Chonino
Perro ChoninoPerro Chonino
Perro Chonino
 
Aneurisma cerebral
Aneurisma cerebralAneurisma cerebral
Aneurisma cerebral
 
Imported from Google Notebook - My first notebook
Imported from Google Notebook - My first notebookImported from Google Notebook - My first notebook
Imported from Google Notebook - My first notebook
 
25 de mayo de 1810. candela y anabella
25 de mayo de 1810. candela y anabella25 de mayo de 1810. candela y anabella
25 de mayo de 1810. candela y anabella
 
M.Sc thesis Presentation
M.Sc thesis PresentationM.Sc thesis Presentation
M.Sc thesis Presentation
 
How To Build A LinkedIn Profile by Greg Olson, Growl Mobile Agency
How To Build A LinkedIn Profile by Greg Olson, Growl Mobile AgencyHow To Build A LinkedIn Profile by Greg Olson, Growl Mobile Agency
How To Build A LinkedIn Profile by Greg Olson, Growl Mobile Agency
 
Esquema 1 Belén
Esquema 1 BelénEsquema 1 Belén
Esquema 1 Belén
 
Uso De Los Rss Y La Sindicacion De Contenidos En La Educacion
Uso De Los Rss Y La Sindicacion De Contenidos En La EducacionUso De Los Rss Y La Sindicacion De Contenidos En La Educacion
Uso De Los Rss Y La Sindicacion De Contenidos En La Educacion
 
las energías
las energíaslas energías
las energías
 
Nuevo Código de policía
Nuevo Código de policíaNuevo Código de policía
Nuevo Código de policía
 
La educación a distancia vs educaion presencial
La educación a distancia vs educaion presencial La educación a distancia vs educaion presencial
La educación a distancia vs educaion presencial
 
Recuperación ideal vs. recuperación real en un SRI
Recuperación ideal vs. recuperación real en un SRIRecuperación ideal vs. recuperación real en un SRI
Recuperación ideal vs. recuperación real en un SRI
 
Word 2010
Word 2010Word 2010
Word 2010
 
Las apps
Las appsLas apps
Las apps
 

Similar to 1314 i a3-homework

Apurv Gupta, BCA ,Final year , Dezyne E'cole College
 Apurv Gupta, BCA ,Final year , Dezyne E'cole College Apurv Gupta, BCA ,Final year , Dezyne E'cole College
Apurv Gupta, BCA ,Final year , Dezyne E'cole Collegedezyneecole
 
NARESHKUMARMEHTA_S2622389Z_REVISEDRESUME
NARESHKUMARMEHTA_S2622389Z_REVISEDRESUMENARESHKUMARMEHTA_S2622389Z_REVISEDRESUME
NARESHKUMARMEHTA_S2622389Z_REVISEDRESUMENareshkumar Mehta
 
Priyanka Bhatia.BCA Final year 2015
Priyanka Bhatia.BCA Final year 2015Priyanka Bhatia.BCA Final year 2015
Priyanka Bhatia.BCA Final year 2015dezyneecole
 
Vishwajeet Sikhwal ,BCA,Final Year 2015
Vishwajeet Sikhwal ,BCA,Final Year 2015Vishwajeet Sikhwal ,BCA,Final Year 2015
Vishwajeet Sikhwal ,BCA,Final Year 2015dezyneecole
 
Learning area 5 programming
Learning area 5   programmingLearning area 5   programming
Learning area 5 programmingShuren Lew
 
Pooja Bijawat,Bachelor Degree in Computer Application
Pooja Bijawat,Bachelor Degree in Computer ApplicationPooja Bijawat,Bachelor Degree in Computer Application
Pooja Bijawat,Bachelor Degree in Computer Applicationdezyneecole
 
How to Create a Productivity Report (Free Excel and Google Sheets Template)
How to Create a Productivity Report (Free Excel and Google Sheets Template)How to Create a Productivity Report (Free Excel and Google Sheets Template)
How to Create a Productivity Report (Free Excel and Google Sheets Template)Time Doctor
 
SAP HR: Training & event management
SAP HR: Training & event managementSAP HR: Training & event management
SAP HR: Training & event managementanisha gupta
 
Oop project report using c++
Oop project report using c++Oop project report using c++
Oop project report using c++Lameck Elias
 
Divyansh Mehta,BCA Final Year 2015 ,Dezyne E'cole College
Divyansh Mehta,BCA Final Year 2015 ,Dezyne E'cole CollegeDivyansh Mehta,BCA Final Year 2015 ,Dezyne E'cole College
Divyansh Mehta,BCA Final Year 2015 ,Dezyne E'cole Collegedezyneecole
 
Wioska moldings private limited
Wioska moldings private limitedWioska moldings private limited
Wioska moldings private limitedAkhilendra Shukla
 
sfc Assingment l4dc NCC education
 sfc Assingment l4dc NCC education sfc Assingment l4dc NCC education
sfc Assingment l4dc NCC educationDavid Parker
 
CRICOS Provider No. 00103D ITECH1400 Foundations of Progra.docx
CRICOS Provider No. 00103D ITECH1400 Foundations of Progra.docxCRICOS Provider No. 00103D ITECH1400 Foundations of Progra.docx
CRICOS Provider No. 00103D ITECH1400 Foundations of Progra.docxfaithxdunce63732
 
Payroll Management System Complete Report
Payroll Management System Complete ReportPayroll Management System Complete Report
Payroll Management System Complete ReportSavio Aberneithie
 
Nikhil Khandelwal BCA 3rd Year
Nikhil Khandelwal BCA 3rd YearNikhil Khandelwal BCA 3rd Year
Nikhil Khandelwal BCA 3rd Yeardezyneecole
 

Similar to 1314 i a3-homework (20)

1214_CSSS Report_Shared
1214_CSSS Report_Shared1214_CSSS Report_Shared
1214_CSSS Report_Shared
 
Apurv Gupta, BCA ,Final year , Dezyne E'cole College
 Apurv Gupta, BCA ,Final year , Dezyne E'cole College Apurv Gupta, BCA ,Final year , Dezyne E'cole College
Apurv Gupta, BCA ,Final year , Dezyne E'cole College
 
Nareshkumar Mehta
Nareshkumar MehtaNareshkumar Mehta
Nareshkumar Mehta
 
NARESHKUMARMEHTA_S2622389Z_REVISEDRESUME
NARESHKUMARMEHTA_S2622389Z_REVISEDRESUMENARESHKUMARMEHTA_S2622389Z_REVISEDRESUME
NARESHKUMARMEHTA_S2622389Z_REVISEDRESUME
 
Priyanka Bhatia.BCA Final year 2015
Priyanka Bhatia.BCA Final year 2015Priyanka Bhatia.BCA Final year 2015
Priyanka Bhatia.BCA Final year 2015
 
Vishwajeet Sikhwal ,BCA,Final Year 2015
Vishwajeet Sikhwal ,BCA,Final Year 2015Vishwajeet Sikhwal ,BCA,Final Year 2015
Vishwajeet Sikhwal ,BCA,Final Year 2015
 
Learning area 5 programming
Learning area 5   programmingLearning area 5   programming
Learning area 5 programming
 
Pooja Bijawat,Bachelor Degree in Computer Application
Pooja Bijawat,Bachelor Degree in Computer ApplicationPooja Bijawat,Bachelor Degree in Computer Application
Pooja Bijawat,Bachelor Degree in Computer Application
 
How to Create a Productivity Report (Free Excel and Google Sheets Template)
How to Create a Productivity Report (Free Excel and Google Sheets Template)How to Create a Productivity Report (Free Excel and Google Sheets Template)
How to Create a Productivity Report (Free Excel and Google Sheets Template)
 
SAP HR: Training & event management
SAP HR: Training & event managementSAP HR: Training & event management
SAP HR: Training & event management
 
Oop project report using c++
Oop project report using c++Oop project report using c++
Oop project report using c++
 
Vijay Kumar
Vijay KumarVijay Kumar
Vijay Kumar
 
Divyansh Mehta,BCA Final Year 2015 ,Dezyne E'cole College
Divyansh Mehta,BCA Final Year 2015 ,Dezyne E'cole CollegeDivyansh Mehta,BCA Final Year 2015 ,Dezyne E'cole College
Divyansh Mehta,BCA Final Year 2015 ,Dezyne E'cole College
 
Wioska moldings private limited
Wioska moldings private limitedWioska moldings private limited
Wioska moldings private limited
 
sfc Assingment l4dc NCC education
 sfc Assingment l4dc NCC education sfc Assingment l4dc NCC education
sfc Assingment l4dc NCC education
 
CRICOS Provider No. 00103D ITECH1400 Foundations of Progra.docx
CRICOS Provider No. 00103D ITECH1400 Foundations of Progra.docxCRICOS Provider No. 00103D ITECH1400 Foundations of Progra.docx
CRICOS Provider No. 00103D ITECH1400 Foundations of Progra.docx
 
Payroll Management System Complete Report
Payroll Management System Complete ReportPayroll Management System Complete Report
Payroll Management System Complete Report
 
MPP-UPNVJ
MPP-UPNVJMPP-UPNVJ
MPP-UPNVJ
 
Nikhil Khandelwal BCA 3rd Year
Nikhil Khandelwal BCA 3rd YearNikhil Khandelwal BCA 3rd Year
Nikhil Khandelwal BCA 3rd Year
 
ADLAB.pdf
ADLAB.pdfADLAB.pdf
ADLAB.pdf
 

1314 i a3-homework

  • 1. 1 IN THE NAME OF ALLAH, THE MOST BENEFICENT, THE MOST MERCIFUL DEPARTMENT OF ICT CENTRE FOR FOUNDATION STUDIES, IIUM SEMESTER I, SESSION 2013/2014 SEF1514 ASSIGNMENT 3 Student #1: ……………………………………………………….………. Matric No: ……….….………… Student #2: ………………………………………………………….…… Matric No: …….….….………… Group No: …………….. Write a C program to display net weekly pay for a number of staff. Your program must use the following user-defined functions: Use your group number and matric number to name the program file. e.g. “G101-112345-112346.c Don’t use global declarations Declare array for 5 staff names Declare array for 5 staff week hours worked Declare array for 5 staff net weekly pay Declare symbolic constant for hourly waged to be 10 RM Declare symbolic constant for tax rate to be 0.05 Declare other needed variables From main() call the following functions to get inputs: getHours() - to input number of hours worked for 5 staff. Then main will call: calculate() – to calculate the net weekly pay for the 5 staff. Use the following formulas. Weekly_Pay = week_hours_worked * hourly_wage Net_Weekly_Pay = Weekly_Pay – (Tax_Rate * Weekly_Pay ) Then main() will pass net weekly pay to: display() - to print the Names and calculated net weekly pay / 30
  • 2. 2 - Call function FindHighest() to return highest net weekly. display() will display the highest net weekly pay - Display name of highest net weekly pay - Call function FindAvg() to return net weekly pay average. display() will display the average. Repeat the whole process until the user decided to stop. Sample output: Welcome to Net Weekly Pay Program Programer 1: Mahmoud Al-Shawabkeh 112345 Programer 2: Azizul Azlan 112346 Group Number: G101 Enter week hours worked for 5 staff: 40 45 40 30 35 The names are Ahmad Ali Omar Fahmi Othman The net weekly pay is 380 428 380 285 333 Highest net weekly pay is 428 Staff name of highest net weekly pay is Ali Average of all net weekly pay is 361.2 Do you want to continue? <Y/y/N/n>: N Press any key to continue . . .