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

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
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.
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education