Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
|
|
@ -0,0 +1,37 @@
|
|||
#include<math.h>
|
||||
#include<stdio.h>
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
double inputs[11], check = 400, result;
|
||||
int i;
|
||||
|
||||
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 :");
|
||||
|
||||
for (i = 10; i >= 0; i--)
|
||||
{
|
||||
result = sqrt (fabs (inputs[i])) + 5 * pow (inputs[i], 3);
|
||||
|
||||
printf ("\nf(%lf) = ");
|
||||
|
||||
if (result > check)
|
||||
{
|
||||
printf ("Overflow!");
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
printf ("%lf", result);
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue