Data update
This commit is contained in:
parent
8e4e15fa56
commit
72eb4943cb
1853 changed files with 35514 additions and 9441 deletions
|
|
@ -1,37 +1,34 @@
|
|||
#include<math.h>
|
||||
#include<stdio.h>
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
|
||||
int
|
||||
main ()
|
||||
double f(double x)
|
||||
{
|
||||
return sqrt(fabs(x)) + 5 * pow(x, 3);
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
double inputs[11], check = 400, result;
|
||||
int i;
|
||||
|
||||
printf ("\nPlease enter 11 numbers :");
|
||||
|
||||
printf ("\nPlease enter 11 numbers: ");
|
||||
for (i = 0; i < 11; i++)
|
||||
{
|
||||
scanf ("%lf", &inputs[i]);
|
||||
}
|
||||
|
||||
printf ("\n\n\nEvaluating f(x) = |x|^0.5 + 5x^3 for the given inputs :");
|
||||
|
||||
{
|
||||
scanf ("%lf", &inputs[i]);
|
||||
}
|
||||
printf ("\n\n\nEvaluating f(x) = |x|^0.5 + 5x^3 for the given inputs:");
|
||||
for (i = 10; i >= 0; i--)
|
||||
{
|
||||
result = f(inputs[i]);
|
||||
printf ("\nf(%lf) = ", inputs[i]);
|
||||
if (result > check)
|
||||
{
|
||||
result = sqrt (fabs (inputs[i])) + 5 * pow (inputs[i], 3);
|
||||
|
||||
printf ("\nf(%lf) = ");
|
||||
|
||||
if (result > check)
|
||||
{
|
||||
printf ("Overflow!");
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
printf ("%lf", result);
|
||||
}
|
||||
printf ("Overflow!");
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
printf ("%lf", result);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue