C Notes (Data Planet)
C Notes (Data Planet)
Start/End
Input/Ouput
Expression
Print sum
Stop
WAP to read basic salary of employee and calculate gross salary as per below
policy
1. If basic salary is less than 1500 then HRA=10% of basic and DA=25% of
basic
2. If basic salary is 1500 or above then HRA=500 and DA=50% of basic
WAP to read an integer and check if it is even or odd
WAP to read two integers and check if first is divisible by second or not.
Bank has introduced an incentive policy as follows:
Every account holder will get bonus =2% of balance.
In case of female account holder, 5% of balance will be given only if her
balance > 5000.
WAP to read gender and balance then determine bonus.
Truth Table
Truth Table
Home Work
}
WAP to read a number and check if it is prime number
or not
Working
WAP to print “Hello World” 10 times by using while
loop
WAP to read a number and find sum of its digits.
.
WAP to read a number and find product of its digits.
WAP to read a number and count occurrences of 5 in it
– Home Work
Calculate multiplication through recursive function
Calculate sum of digits through recursive function
WAP to read a string and find its length by using
library function
Example-2
Swapping through pointers
Example-3
Example
Sorting of integers by using qsort
Example-2
compilation