/*program to calculate hra,da in salary if salary less than
10000 then hra15%,da13% otherwise hra20%,da18%/*
Answer Posted / parmeshwar
#include<stdio.h>
#include<conio.h>
void main()
{
long int bs,da,hra;
clrscr();
printf("\n enter the basic salary of employee=");
scanf("%f",&bs);
if (bs<10000)
{
printf("\n da : %f",da=(bs*15)/100);
printf("\n hra : %f",hra=(bs*13)/100);
printf("\n net salary: %f",da+hra);
}
else
{
printf("\n da : %f",da=(bs*20)/100);
printf("\n hra : %f",hra=(bs*18)/100);
printf("\n net salary: %f",da+hra);
}
getch();
}
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
What is wild pointer in c with example?
What are the header files used in c language?
You have given 2 array. You need to find whether they will
create the same BST or not.
For example:
Array1:10 5 20 15 30
Array2:10 20 15 30 5
Result: True
Array1:10 5 20 15 30
Array2:10 15 20 30 5
Result: False
One Approach is Pretty Clear by creating BST O(nlogn) then
checking two tree for identical O(N) overall O(nlogn) ..we
need there exist O(N) Time & O(1) Space also without extra
space .Algorithm ??
DevoCoder
guest
Posted 3 months ago #
#define true 1
#define false 0
int check(int a1[],int a2[],int n1,int n2)
{
int i;
//n1 size of array a1[] and n2 size of a2[]
if(n1!=n2) return false;
//n1 and n2 must be same
for(i=0;i
Write a c program to demonstrate character and string constants?
What is the purpose of the statement: strcat (S2, S1)?
What is optimization in c?
What does c in a circle mean?
pgm to find any error in linklist(in single linklist check whether any node points any of previous nodes instead of next node)
Explain what is output redirection?
how can I convert a string to a number?
What is the difference between arrays and pointers?
Explain how can a program be made to print the line number where an error occurs?
Define Spanning-Tree Protocol (STP)
Is c still used?
a value that does not change during program execution a) variabe b) argument c) parameter d) none