Please please help with the code! Apperciate all the effort
--create using html5, css3, and javascript.
--The interface permits the user to compute the number of primes
in ranges of integer values.
--The interface should present the user with 4 pairs of "number"
boxes in which 4 pairs of integer values can be entered. Each pair
of values should be used by a thread to compute the number of prime
numbers in that range, inclusive.
-- If any box is empty, then no thread should be created to compute
the (empty) range.
--Provide a start button that the user can click when the above
values have been entered.
--Finally, when the computation is complete, the number of primes
in all ranges should be displayed on the page with a brief
meaningful message.
--It is valid to assume that no range of numbers will include a
number smaller than 3. All ranges are inclusive.
Here is the output screenshot.
This is done using HTML,CSS and javascript only as requested.
*****************************************************************************************************************************************
Screenshot of the output:

*****************************************************************************************************************************************
Code:
<!DOCTYPE html>
<html>
<style>
input[type=date],[type=text], select {
width: 100%;
padding: 12px 20px;
margin: 8px 0;
display: inline-block;
border: 1px solid #ccc;
border-radius: 4px;
box-sizing: border-box;
}
button {
width: 100%;
background-color: #4CAF50;
color: white;
padding: 14px 20px;
margin: 8px 0;
border: none;
border-radius: 4px;
cursor: pointer;
}
input[type=submit]:hover {
background-color: #45a049;
}
div {
border-radius: 5px;
background-color: #f2f2f2;
padding: 20px;
}
</style>
<body>
<center><h2>Prime
numbers</h2></center>
<br>
<div>
<u><h3>Pair
1</h43></u><br><br>
<label for="number 1">Number 1</label>
<input type="number" id="pair_1_num_1">
<label for="number 2">Number 1</label>
<input type="number" id="pair_1_num_2">
<div>
<label for="number 1">Result : </label>
<span id="result1"></span>
</div>
</div>
<br>
<div>
<u><h3>Pair
2</h43></u><br><br>
<label for="number 1">Number 1</label>
<input type="number" id="pair_2_num_1">
<label for="number 2">Number 1</label>
<input type="number" id="pair_2_num_2">
<div>
<label for="number 2">Result : </label>
<span id="result2"></span>
</div>
</div>
<br>
<div>
<u><h3>Pair
3</h43></u><br><br>
<label for="number 1">Number 1</label>
<input type="number" id="pair_3_num_1">
<label for="number 2">Number 1</label>
<input type="number" id="pair_3_num_2">
<div>
<label for="number 3">Result : </label>
<span id="result3"></span>
</div>
</div>
<br>
<div>
<u><h3>Pair
4</h43></u><br><br>
<label for="number 1">Number 1</label>
<input type="number" id="pair_4_num_1">
<label for="number 2">Number 1</label>
<input type="number" id="pair_4_num_2">
<div>
<label for="number 4">Result : </label>
<span id="result4"></span>
</div>
</div>
<button id="calculate"
onclick="calculatePrime()">Calculate</button>
<br>
</body>
<script type="text/javascript">
function calculatePrime(){
var pair_1_num_1 =
document.getElementById("pair_1_num_1").value;
var pair_1_num_2 =
document.getElementById("pair_1_num_2").value;
var pair_2_num_1 =
document.getElementById("pair_2_num_1").value;
var pair_2_num_2 =
document.getElementById("pair_2_num_2").value;
var pair_3_num_1 =
document.getElementById("pair_3_num_1").value;
var pair_3_num_2 =
document.getElementById("pair_3_num_2").value;
var pair_4_num_1 =
document.getElementById("pair_4_num_1").value;
var pair_4_num_2 =
document.getElementById("pair_4_num_2").value;
var result1 = document.getElementById("result1").innerHTML =
"";
var result2 = document.getElementById("result2").innerHTML =
"";
var result3 = document.getElementById("result3").innerHTML =
"";
var result4 = document.getElementById("result4").innerHTML =
"";
if(pair_1_num_1.length != 0 &&
pair_1_num_2.length!=0)
executeAsyncTask(function() {
findPrimesInRange(pair_1_num_1,
pair_1_num_2,document.getElementById("result1"));
});
if(pair_2_num_1.length != 0 &&
pair_2_num_2.length!=0)
executeAsyncTask(function() {
findPrimesInRange(pair_2_num_1,
pair_2_num_2,document.getElementById("result2"));
});
if(pair_3_num_1.length != 0 &&
pair_3_num_2.length!=0)
executeAsyncTask(function() {
findPrimesInRange(pair_3_num_1,
pair_3_num_2,document.getElementById("result3"));
});
if(pair_4_num_1.length != 0 &&
pair_4_num_2.length!=0)
executeAsyncTask(function() {
findPrimesInRange(pair_4_num_1,
pair_4_num_2,document.getElementById("result4"));
});
}
function findPrimesInRange(a,b,resultSpan){
var i = 0;
var flag = 0;
var j = 0;
for (i = a; i <= b; i++) {
if (i == 1) {
continue;
}
flag = 1;
for (j = 2; j <= i / 2; ++j) {
if (i % j == 0) {
flag = 0;
break;
}
}
if (flag == 1) {
//alert("PrimesInRange " + i);
resultSpan.innerHTML = resultSpan.innerHTML + " " + i;
}
}
}
function executeAsyncTask(func) {
setTimeout(func, 0);
}
</script>
</html>
*****************************************************************************************************************************************
Please please help with the code! Apperciate all the effort --create using html5, css3, and javas...
PLs someone pls help me by editing my code to calculate the 4
pair of range to calculate the prime numbers by using web
workers(You will have to use 4 workers).
(I already have the code to manipulate the prime numbers but I
need your help with web worker part)(code is below)
Can someone pls help with the code of computing prime number for
four pair of an integer values by using web worker concept !
Appreciate all the effort!...
ProblemGiven a number n between 1 and 12 (inclusive), your job is to find all the pairs of numbers that produce n when summed. For instance, given the number 5, two possible pairs of numbers are1, 4 and 2, 3. Each number in the pair must be unique, meaning that 3, 3 is not a valid pair to sum to 6.You will be writing a method to accomplish this goal.sumOfPairs()Your method will take as a parameter the integer n to...
The Sieve of Eratosthenes is a simple, ancient algorithm for finding all prime numbers up to any given limit. It does so by iteratively marking as composite lie., not prime) the multiples of each prime, starting with the multiples of 2 The sieve of Eratosthenes can be expressed in pseudocode, as follows: Input: an integer n Let A be an array of 8oo1ean values, indexed by integers 2 to n, initially all set to true. for t - 2, 3,...
I need help in C++ assignment. please add statements and i am Xcode complier user. Requested files: CountDecades.cpp (Download) Maximum upload file size: 96 KiB Write a C++ program named CountDecades.cpp. In this program you will have two integer arrays. One named inputArray of size 20 containing the values: 83, 2, 23, 11, 97, 23, 41, 67, 16, 25, 1 , 4, 75, 92, 52, 6, 44, 81, 8, 64 in the order specified, and an empty integer array of...
Create an HTML5 page that contains a form to collect the following data. The text in bold indicates the id value that should be assigned to each html control: Product (drop down list) product – iPad, iPhone 6S, Galaxy 5S, Moto X, and so on Quantity (number) quantity Unit price (number) unit_price Discount (%)(number) discount_rate Date (date) order_date First Name (text box) first_name Last Name (text box) last_name Payment type (drop down list) payment_type – Visa, Master, Discover, Amex, and...
Write the code in C with all the right output please.
Problem: In this assignment you will analyze a data set of 10,000 randomly generated integers. From this data set you will display a count of the prime numbers that are greater than the average (double) of the entire data set. The user will input only a single integer value to serve as the seed for the random number generator. The use of a common seed will result in output...
I need help writing these 2 programs please include all the indents :) In this programming challenge you are to create two Python programs: randomwrite.py andrandomread.py. One program, randomwrite.py, is to write a set of random numbers to a file. The second program, randomread.py, is to read a set of random numbers from a file, counts how many were read, displays the random numbers, and displays the total count of random numbers. Random Number File Writer (randomwrite.py) Create a program...
Use the IO module for all inputs and outputs. Sevens are considered lucky numbers. Your task is to count the number of sevens that appear within a range of integer numbers. Your solution should make use of looping constructs. Ask the user for the following information, in this order: The lower end of the range The upper end of the range Compute and then output the number of sevens that appear in the sequence from lower end to upper end...
Add JavaScript code in the “find_primeV2.js” to allow users to enter a number, and then based on the number of user enters, to find out how many prime numbers there are up to and including the user inputted number and then display them on the web page. The following are the detailed steps to complete this assignment: Step 1. [30 points] In “find_primeV2.js”, complete isPrime() function by (1) Adding one parameter in function header. That parameter is used to accept...
New Perspectives on HTML5 and CSS3. Solve Chapter 13 Case
Problem 3.
mas_register.js
"use strict";
/*
New Perspectives on HTML5, CSS3, and JavaScript 6th Edition
Tutorial 13
Case Problem 3
Filename: mas_register.js
Author:
Date:
Function List
=============
formTest()
Performs a validation test on the selection of the conference
session package and the conference discount number
calcCart()
Calculates the cost of the registration and saves data
in session storage
writeSessionValues()
Writes data values from session storage in to the
registration...