Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


Write the program with at least two functions to solve the
following problem. The members of the board of a small
university are considering voting for a pay increase for
their 5 faculty members. They are considering a pay
increase of 8%. Write a program that will prompt for and
accept the current salary for each of the faculty members,
then calculate and display their individual pay increases.

At the end of the program, print the total faculty payroll
before and after the pay increase, and the total pay
increase involved.




Write the program with at least two functions to solve the following problem. The members of the bo..

Answer / sammy

#include <stdio.h>
#include <stdlib.h>
double getIncrease (double curSal);

int main (void)
{
double CurrentSal[3];
double payIncreases[3];

for(int i=0; i<3; i++)
{
printf("Enter the salary for employee %d: $", i+1);
scanf("%d", &CurrentSal);
}

for (int j=0; j<3; j++)
{
payIncreases[j] = getIncrease(CurrentSal[j]);
printf("The pay increase for employee %d is $%d\n",j+1,
payIncreases[j]);
}
system ("pause");
return 0;
}
double getIncrease (double curSal)
{
double PayIncrease;
PayIncrease = curSal*.08;

return PayIncrease;
}

Is This Answer Correct ?    1 Yes 1 No

Post New Answer

More C Interview Questions

write a programe to find the factorial of given number using recursion

3 Answers  


What is hash table in c?

0 Answers  


write a C program : To find out the number of identical words in two files . the file name should be taken as command line argument .

1 Answers   Subex,


How can I handle floating-point exceptions gracefully?

0 Answers  


Linked lists -- can you tell me how to check whether a linked list is circular?

0 Answers  


How to write a code for reverse of string without using string functions?

0 Answers   TCS,


Array is an lvalue or not?

0 Answers  


How do we open a binary file in Read/Write mode in C?

0 Answers   Alter,


How can I find the modification date and time of a file?

0 Answers  


Output for following program using for loop only * * * * * * * * * * * * * * *

3 Answers  


count the numbers between 100 and 300, that star with 2 and ends with 2

5 Answers   Mind Tree,


what is diffrence between string and character array?

1 Answers  


Categories