#include
double x, y;
y = sin (x);
helicopter
/* Aim: Program to Find Value of sin(x) using Expansion Series Given Below: sin(x) = x - x3/3! + x5/5! - x7/7!........ Developer: Devharsh Trivedi Web: www.knowcrazy.com */ #include <stdio.h> #include <math.h> main() { float base, pwr, sum, c=1, m=2, i=3, g, h; printf("\nEnter the base value: "); scanf("%f", &base); printf("\nEnter the power value: "); scanf("%f", &pwr); sum = base; ab: m = m * i; h = pow(-1, c); g = pow(base, i); sum = sum + (h * g) / m; i = i + 2; c++; m = m * (i - 1); if (i <= pwr) goto ab; printf("\n\nSum = %f", sum); getch(); }
sizeof is your friend.
what is if(!(str[i]==32))
Reference:cprogramming-bd.com/c_page3.aspx#calculates the value of money
'sin (x)' means the sinus of x. There is no point in 'manipulating' it.
-cos x + C
Using u-substitution (where u = sinx), you'll find the antiderivative to be 0.5*sin2x + C.
Rewrite as, int[sinx 1/2 ] = - (2/3)cosx 3/2 + C ==================or = - (2/3)sqrt[cosx 3] + C ==================
find the program in c-pgms.blogspot.com
int square (int N) return N*N;
ln(sinx) + 1/3ln(sin3x) + C
The indefinite integral of sin x is equal to -cos x + C.
Find the largest of two, then find the largest of that value and the third value. int* max (int* a, int* b) { return (a*) > (b*) ? a : b; } int* max_of_three (int* a, int* b, int* c) { return max (max (a, b), c); }
For first find an example program.
find the area of abc a[2,3] c[6,0]
= cos(x)-(cos3(x))/3 * * * * * Right numbers, wrong sign! Int(sin3x)dx = Int(sin2x*sinx)dx = Int[(1-cos2x)*sinx]dx = Int(sinx)dx + Int[-cos2x*sinx]dx Int(sinx)dx = -cosx . . . . . (I) Int[-cos2x*sinx]dx Let u = cosx, the du = -sinxdx so Int(u2)du = u3/3 = 1/3*cos3x . . . . (II) So Int(sin3x)dx = 1/3*cos3x - cosx + C Alternatively, using the multiple angle identities, you can show that sin3x = 1/4*[3sinx - sin3x] which gives Int(sin3x)dx = 1/4*{1/3*cos(3x) - 3cosx} + C