Banjara lambani

Sunday, 29 January 2017

MAT LAB PROGRAM'S

MAT LAB PROGRAM'S

program to evaluate the quadratic equation ax^2+bx+c


A=input(‘enter the value of  A=’);
B=input(‘enter the value of  B=’);
C=input(‘enter the value of  C=’);
X1=(-b+sqrt(b^2-4*a*c))/(2*a)
X1=(-b-sqrt(b^2-4*a*c))/(2*a)

OUTPUT:

Enter the value of  A=1
Enter the value of  B=4
Enter the value of  C=4

X1=-2
X1=-2


program to calculate the full quantities(x in deg)



x=input('enter the value of x in degrees=');
y1=sind(x/6)
y2=cosd(x)
y3=tand(x/2)
y4=(sind(x/6))^2+(cosd(x/6))^2

 OUTPUT

enter the value of x in degrees=30

y1 =0.0872

y2 = 0.8660

y3 = 0.2679

y4 =1

No comments:

Post a Comment