Data update
This commit is contained in:
parent
5150844a7d
commit
4bb20c9b71
7735 changed files with 38060 additions and 199180 deletions
|
|
@ -1,29 +1,29 @@
|
|||
import extensions;
|
||||
import extensions'math;
|
||||
|
||||
public program()
|
||||
public Program()
|
||||
{
|
||||
real[] inputs := new real[](11);
|
||||
console.printLine("Please enter 11 numbers :");
|
||||
Console.printLine("Please enter 11 numbers :");
|
||||
for(int i := 0; i < 11; i += 1)
|
||||
{
|
||||
inputs[i] := console.readLine().toReal()
|
||||
inputs[i] := Console.readLine().toReal()
|
||||
};
|
||||
|
||||
console.printLine("Evaluating f(x) = |x|^0.5 + 5x^3 for the given inputs :");
|
||||
Console.printLine("Evaluating f(x) = |x|^0.5 + 5x^3 for the given inputs :");
|
||||
for(int i := 10; i >= 0; i -= 1)
|
||||
{
|
||||
real result := sqrt(abs(inputs[i])) + 5 * power(inputs[i], 3);
|
||||
|
||||
console.print("f(", inputs[i], ")=");
|
||||
Console.print("f(", inputs[i], ")=");
|
||||
|
||||
if (result > 400)
|
||||
{
|
||||
console.printLine("Overflow!")
|
||||
Console.printLine("Overflow!")
|
||||
}
|
||||
else
|
||||
{
|
||||
console.printLine(result)
|
||||
Console.printLine(result)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue