Formula_program

// Verify formula 1
#include<stdio.h>
#include<conio.h>
void main()
{
int l,c,d,g,h;
clrscr();
printf("\n Enter value of c:-");
scanf("%d",&c);
printf("\n Enter value of d:-");
scanf("%d",&d);
printf("\n Enter value of g:-");
scanf("%d",&g);
printf("\n Enter value of h:-");
scanf("%d",&h);
l=(c+d)*(g+h);
printf("\n The answer of this formula is %d",l);
}
--------------------------------------------------
// Verify formula 2
#include<stdio.h>
#include<conio.h>
void main()
{
int x,k,a;
clrscr();
printf("\n Enter value of k:-");
scanf("%d",&k);
printf("\n Enter value of a:-");
scanf("%d",&a);
x=((k-4)*(a*4))/100;
printf("\n The answer of formula is %d",x);
}
---------------------------------------------------
// Verify formula 3
#include<stdio.h>
#include<conio.h>
void main()
{
int s,a,c,b;
clrscr();
printf("\n Enter value of a:-");
scanf("%d",&a);
printf("\n Enter value of c:-");
scanf("%d",&c);
printf("\n Enter value of b:-");
scanf("%d",&b);
s=((4*a+c)-2*a*b)/100;
printf("\n The answer of formula is %d",s);
}
--------------------------------------------------------
// Verify formula 4
#include<stdio.h>
#include<conio.h>
void main()
{
int a,p,r,n;
clrscr();
printf("\n Enter value of p:-");
scanf("%d",&p);
printf("\n Enter value of r:-");
scanf("%d",&r);
printf("\n Enter value of n:-");
scanf("%d",&n);
a=p*(1+(r/100)/n)-p;
printf("\n The answer of formula is %d",a);
}
--------------------------------------------------------------
// Verify formula 5
#include<stdio.h>
#include<conio.h>
void main()
{
int t,v,s,l,m;
clrscr();
printf("\n Enter value of v:-");
scanf("%d",&v);
printf("\n Enter value of s:-");
scanf("%d",&s);
printf("\n Enter value of l:-");
scanf("%d",&l);
printf("\n Enter value of m:-");
scanf("%d",&m);
t=((v+s)+(l-m)*l);
printf("\n The answer of formula is %d",t);
}
-------------------------------------------------------------------
// Verify formula 6
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,c;
clrscr();
printf("\n Enter value of a:-");
scanf("%d",&a);
printf("\n Enter value of b:-");
scanf("%d",&b);
c=(a+b)*(a+b);
printf("\n The answer of formula is %d",c);
}
-----------*--------

No comments:

Post a Comment