Computer Science, asked by hardhik68, 7 months ago

Q3. Write a program to input the basic pay of an employee and find the gross pay of the
employee for the following allowances and deductions:
Dearness Allowance 25% of Basic Pay
House Rent Allowancew15% of Basic Pay
Provident Fund=8.33% of Basic Pay
Net Pay=Basic Pay + Dearness Allowance + House Rent Allowance
Gross Pay-Net Pay - Provident Fund​

Answers

Answered by srajfaroquee
9

Answer:

Note: I am using C++ programming language.

#include<iostream>

using namespace std;

int main () {

float basic_pay,dearness,h_rent,fund,net_pay ,gross_pay ;

cout<<"Enter Basic pay:";

cin>>basic_pay;

dearness = (25/100)*basic_pay;

h_rent =  (15/100)*basic_pay;

fund =  (8.33/100)*basic_pay;

net_pay = basic_pay + dearness + h_rent ;

gross_pay  = net_pay - fund;

cout <<"The GrossPay is" <<gross_pay ;

return 0;

}

**Please follow me and mark this ans as Branliest answer.Thank you!

Answered by duragpalsingh
12

Question:

Write a program to input the basic pay of an employee and find the gross pay of the employee for the following allowances and deductions.

Dearness Allowance = 25% of Basic Pay

House Rent Allowance=15% of Basic Pay

Provident Fund=8.33% of Basic Pay

Net Pay=Basic Pay + Dearness Allowance + House Rent Allowance

Gross Pay= Net Pay – Provident Fund

Solution:

Language used: Java

import java.util.*;

public class Question

{

static void main()

{

Scanner sc=new Scanner(System.in);

float basic,da,hra,pf,np,gp;

System.out.println("Enter the basic pay of the employee:");

basic=sc.nextFloat();

da=(float)25/100*basic;

hra=(float)15/100*basic;

pf=(float)8.33/100*basic;

np=basic+da+hra;

gp=np-pf;

System.out.println("Gross Pay:"+gp);

}

}

Learn More on Brainly:

Write a program to print sum of Fibonacci series upto fifth term.

https://brainly.in/question/9009750

Write a program to input 5 integers and find the average.

https://brainly.in/question/29286707

Similar questions