Chapter - 1: Getting Started

Ramesh’s basic salary is input through the keyboard. His dearness allowance is 40% of basic salary, and house rent allowance is 20% of basic salary. Write a program to calculate his gross salary.


C
Sections
1
Exercises
#include<stdio.h>
#include<conio.h> int main() { int sal; float gros_sal; printf("Enter the basic salary of Ramesh : "); scanf("%d", &sal); //salary calculated gros_sal=sal+(sal*40/100)+(sal*20/100); printf("%f is the gross salary of Ramesh.", gros_sal); getch(); return 0; }

© 2021 Garbage Valuegarbage value logo