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

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

the length and breadth of a rectangle and radius of a circle are input through the keyboard. write a program to calculate the area and perimeter of the rectangle, and the area and circumference of the circle

paper of size A0 has dimensions 1189 mmx 841 mm .Each subsequent size A(n) is defined as A(n-1) cut in half parallel to its shorter sides .Thus paper of size A1 would have dimensions 841 mm X 594 mm .Write a program to calculate the print paper sizes A0,A1,A2,.........A8.