Ramesh basic salary is input through the keyword .His dearness allowance is 40% of the basic salary and house rent allowance is 20% of basic salary write a program to calculate his gross salary.

 Ramesh basic salary is input through the keyword .His dearness allowance is 40% of the basic salary and house rent allowance is 20% of basic salary  write a program to calculate his gross salary.

 //calculate Ramesh gross salary
#include<stdio.h>
int main(){
    float bp,da ,hra, grpay;
    printf("\n Enter the value basic salary of ramesh:");
    scanf("%f",&bp);
    da=0.4*bp;
    hra =0.2*bp;
    grpay=bp+da+hra;
    printf("Basic salary of Ramesh=%f\n",bp);
    printf("Dearness allowance=%f\n",da);
    printf("House rent allowance=%f\n",hra);
    printf("Gross pay of Ramesh is %f\n",grpay);
    return 0;
}

output---Enter the value basic salary of ramesh:1200

              basic salary of ramesh:1200.000

                Dearness allowance=480.0000

                 house rent of allowance=240.00000

                gross pay of ramesh's is =1920.000 

 

output -----
all about of c language(very simple) --https://allcodescience.blogspot.com/2021/12/how-learn-of-c-language.html

Discrete Mathematical Structure. Set Theory Functions Relations Propositional Logic Predicate Logic Group Theory(btech , bsc,iit jam and other)

  https://allcodescience.blogspot.com/2021/12/discrete-mathematical-structure.html


                                

 

Comments

Popular posts from this blog

How will learn of c language?

If lengths of three sides of a tringle are input through the keyboard write a program to find the area of tringle.

The body mas index (BMI) is defined as ratio of the weight of the person (in kelometer) to the square oef height (in meters) . write a program that recieve weight and height calculate the BMI and report the BMI category as per the following table .