Welcome to Onlinetunes24 .....

We are committed to become your long-term, trusted partner. Our priority is not only to provide professional services and solutions but to become your IT vendor dedicated to meet your needs today and support your growing business needs tomorrow.

This is default featured post 1 title

We are committed to become your long-term, trusted partner. Our priority is not only to provide professional services and solutions but to become your IT vendor dedicated to meet your needs today and support your growing business needs tomorrow.

This is default featured post 2 title

We are committed to become your long-term, trusted partner. Our priority is not only to provide professional services and solutions but to become your IT vendor dedicated to meet your needs today and support your growing business needs tomorrow.

This is default featured post 3 title

We are committed to become your long-term, trusted partner. Our priority is not only to provide professional services and solutions but to become your IT vendor dedicated to meet your needs today and support your growing business needs tomorrow.

This is default featured post 4 title

We are committed to become your long-term, trusted partner. Our priority is not only to provide professional services and solutions but to become your IT vendor dedicated to meet your needs today and support your growing business needs tomorrow.

Find Factorial

Write a program to find factorial.

Program:
#include<stdio.h>
main(){
int n,i,fact=1;

printf("Enter your value = ");
scanf("%d", &n);

for(i=1; i<=n; i++)
fact=fact*i;

printf("Factorial = %d",fact);
}

Waiver of Tuition Fee

Write a program for find out the waiver of tuition fee the following condition.
1. If CGPA greater then or equal to 10, then waiver 90% of total amount fee.
2. If CGPA greater then or equal to 9, then waiver 50% of total amount fee.
3. If CGPA greater then or equal to 8.5, then waiver 30% of total amount fee.
4. If CGPA less then 8, then waiver 5% of total amount fee.

Program:
#include<stdio.h>
main(){
float amount,cgpa,waiver;

printf("Enter amount = ");
scanf("%f", &amount);

printf("CGPA = ");
scanf("%f", &cgpa);

if(cgpa>=10)
waiver=amount*.90;

else if(cgpa>=9)
waiver=amount*.50;

else if(cgpa>=8.5)
waiver=amount*.30;

else if(cgpa<8)
waiver=amount*.05;

printf("Waiver = %f", waiver);
}
 

Find out the quardratic equation


Write a program for the following equation ax2+bx+c
Program:
#include<stdio.h>
#include<math.h>
main(){
float a,b,c,x1,x2,d;

printf("A=? , B=? , C=? ");
scanf("%f %f %f", &a, &b, &c);

d=b*b-4*a*c;

if(d>0)
{
x1=(-b+sqrt(d))/2*a;
x2=(-b-sqrt(d))/2*a;
}

else if(d==0)
{
x1=-b/2*a;
x2=-b/2*a;
}

else
printf("Negative number so program not possible calculation.");

if(d>=0)
printf("X1=%f, \n X2=%f", x1, x2);
}
 

Group Insurance

Write a program calculate the group insurance using following condition.
1. Fix 96 Tk If basic is grater then or equal to 5000
2. Fix 72 Tk If basic is grater then or equal to 3000
3. Fix 48 Tk If basic is grater then or equal to 1700
4. Other wise 0 Tk

Program:
#include<stdio.h>
main(){
int basic,gi;

printf("Enter Basic = ");
scanf("%d", &basic);

if(basic>=5000)
gi=96;

else if(basic>=3000)
gi=72;

else if(basic>=1700)
gi=48;

else
gi=0;

printf("Group Insurances = %d", gi);
}

City Allowance

Write a program for calculate city allowance using following condition
1. 20% of basic. but if city allowance grater then 2500 then city allowance will be fixed 2500

Program:
#include<stdio.h>
main(){
int ca, basic;

printf("Enter basic = ");
scanf("%d", &basic);

ca=basic*.20;

if(ca>2500)
ca=2500;

printf("City allowance =%d", ca);
}

Loading
Twitter Delicious Facebook Digg Stumbleupon Favorites More

 
Flying Twitter Bird Widget By ICT Sparkle