Draw a flowchart with its post and precondition for the two Separate images of code
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
Related questions
Question
Please help me with these questions. I am having trouble understanding what to do
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");](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F1399694f-68c7-4a50-b56d-843cae9b4041%2Fcc35ad88-d50c-467e-bf72-b96f2e66d8e3%2Fy42dian_processed.jpeg&w=3840&q=75)
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");](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F1399694f-68c7-4a50-b56d-843cae9b4041%2Fcc35ad88-d50c-467e-bf72-b96f2e66d8e3%2Fci2e1mu_processed.jpeg&w=3840&q=75)
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

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step 1: Analyzing the given question
VIEWStep 2: given JavaScript code correction
VIEWStep 3: implementing complete java script code for given functions
VIEWStep 4: given JavaScript code algorithm
VIEWStep 5: given javascript code explanation
VIEWStep 6: given JavaScript flowchart for problem 15 and problem 14
VIEWSolution
VIEWStep by step
Solved in 7 steps with 7 images

Knowledge Booster
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
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON

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)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON

Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education