Draw a flowchart with its post and precondition for the two Separate images of code

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter9: Advanced Array Concepts
Section: Chapter Questions
Problem 2PE
icon
Related questions
Question

Please help me with these questions. I am having trouble understanding what to do 

Programming language: JavaScript 

Draw a flowchart with its post and precondition for the two Separate images of code 

Thank you 

 

4
function problem15() {
5
var outputObj = document.getElementById("output");
6
7
// Retrieve the value from the number input
3
9
1
2
3
+
5
7
3
9
9
var inputNumber = document.getElementById("numberInput").value;
inputNumber = parseInt(inputNumber);
outputObj.innerHTML = "number: " + inputNumber + "<br><br>";
// Set the font size to 11px and center-align the text
outputObj.style.cssText = "font-size: 40px; text-align: center;";
for (var i = 1; i <= inputNumber; i++) {
for (var j = 0; j < i; j++) {
|| outputObj.innerHTML += "****
}
outputObj.innerHTML += "<br>";
L
}
5
}
// Inform the user that the program has ended
outputObj.innerHTML += "<br>" + "Program ended";
document.getElementsByTagName("button")[0].setAttribute("disabled", "true");
Transcribed Image Text:4 function problem15() { 5 var outputObj = document.getElementById("output"); 6 7 // Retrieve the value from the number input 3 9 1 2 3 + 5 7 3 9 9 var inputNumber = document.getElementById("numberInput").value; inputNumber = parseInt(inputNumber); outputObj.innerHTML = "number: " + inputNumber + "<br><br>"; // Set the font size to 11px and center-align the text outputObj.style.cssText = "font-size: 40px; text-align: center;"; for (var i = 1; i <= inputNumber; i++) { for (var j = 0; j < i; j++) { || outputObj.innerHTML += "**** } outputObj.innerHTML += "<br>"; L } 5 } // Inform the user that the program has ended outputObj.innerHTML += "<br>" + "Program ended"; document.getElementsByTagName("button")[0].setAttribute("disabled", "true");
function problem14() {
var outputObj = document.getElementById("output");
var inputNumber
parseInt(prompt ("Please enter a number:
聲響
""));
outputObj.innerHTML = "Input number:
"Input number: " + inputNumber + "<br><br>Fibonacci" +
if (inputNumber >= 0) {
}
outputObj.innerHTML += "0";
if (inputNumber >= 1) {
}
outputObj.innerHTML += "¸ 1";
var secondLast = 0;
var last = 1;
for (var i = 2; i < inputNumber; i++) {
var newValue
=
second Last + last;
outputObj.innerHTML +=
+ newValue;
secondL (local var) newValue: number
last = newValue;
}
}
// Inform the user that the program has ended
outputObj.innerHTML += "<br><br>" + "Program ended";
document.getElementsByTagName("button")[0].setAttribute("disabled", "true");
Transcribed Image Text:function problem14() { var outputObj = document.getElementById("output"); var inputNumber parseInt(prompt ("Please enter a number: 聲響 "")); outputObj.innerHTML = "Input number: "Input number: " + inputNumber + "<br><br>Fibonacci" + if (inputNumber >= 0) { } outputObj.innerHTML += "0"; if (inputNumber >= 1) { } outputObj.innerHTML += "¸ 1"; var secondLast = 0; var last = 1; for (var i = 2; i < inputNumber; i++) { var newValue = second Last + last; outputObj.innerHTML += + newValue; secondL (local var) newValue: number last = newValue; } } // Inform the user that the program has ended outputObj.innerHTML += "<br><br>" + "Program ended"; document.getElementsByTagName("button")[0].setAttribute("disabled", "true");
Expert Solution
steps

Step by step

Solved in 7 steps with 7 images

Blurred answer
Knowledge Booster
Structure chart
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT