Amail-order housesellsfivedifferentproductswhoseretailpricesareasfollows:product1, $2.98; product 2, $4.50; product 3, $9.98; product 4, $4.49; and product 5, $6.87. Write a script that reads a series of pairs of numbers as follows: a) Product number b) Quantity sold for one day(html)
ANSWER:
Step 1: Amail sells five different products at retail prices which are given as:
In the program user give two inputs:
Step 2: Final output prints the total price of one day of particular product no which user enters
PROGRAM:
HTML Code :
<!DOCTYPE html> <!-- tells the version of html
-->
<html>
<head>
<title>House Products</title>
</head>
<body>
<h1><b>House Sell
Products<b></h1>
<script src="script.js"></script> <!-- It link the
page with javascript -->
</body>
</html>
NOTE: save the above file with .html extension
JavaScript Code:
var p=prompt("enter the product no"); //Take input from
user
var q=prompt("enter the no of quantity sold in one day"); //taking
input
var t;
if(p==1)
t=2.98;
if(p==2)
t=4.50;
if(p==3)
t=9.98;
if(p==4)
t=4.49;
if(p==5)
t=6.87;
var s=t*q;
alert("your total selling price for one day is= $"+s); //Printing final results
NOTE: save the above file with script.js
Sample Input:
a>
b>
Sample Output:
Amail-order housesellsfivedifferentproductswhoseretailpricesareasfollows:product1, $2.98; product 2, $4.50; product 3, $9.98; product 4, $4.49; and product 5, $6.87....
A mail order house sells five different products whose retail prices are: product 1: $2.98 product 2: $4.50 product 3: $9.98 product 4: $4.49 product 5: $6.87. Write a program that reads a series of pairs of numbers as follows: a) product number b) quantity sold Your program should use a switch statement to determine the retail price for each product. Your program should calculate and display the total retail value of all products sold. Use a sentinel-controlled loop to...
Write a Java application that prompts the user for pairs of inputs of a product number (1-5), and then an integer quantity of units sold (this is two separate prompts for input values). You must use a switch statement and a sentinel-controlled loop (i.e. a loop that stops execution when an out of range value, such as -1, is input). All 15 items below are for a single purchase. There are five sets of inputs as follows: Product 1 1...
This is in C. 4.19 (Calculating Sales) An online retailer sells five different products whose retail prices are shown in the following table: Product number Retail price $ 2.98 $ 4.50 $9.98 $ 4.49 $6.87 Write a program that reads a series of pairs of numbers as follows: a) Product number b) Quantity sold for one day Your program should use a switch statement to help determine the retail price for each product. Your program should calculate and display the...
matlab only Question 4 A restaurant sells five different desserts whose prices are shown below in the following table: Dessert number Unit Price $ 3.98 $ 2.55 $6.90 $9.85 12.50 2 4 Write a Matiab program to display the above menu to the user. The program then prompts the customer for a key board entry of a series of pairs of numbers as follows Dessert Number: Quantity sold The program should then use switch statement to obtain the total price...
Task 3: Creating a Simple jQuery Application 1. Launch HTML-Kit. 2. Create a new HTML file and save it as nnLab8.htm. 3. Add the following HTML to the file: <!DOCTYPE HTML> <html> <head> <title>Hello World - jQuery Style</title> </head> <body> <div id="first"></div> <div id="second"></div> <a href="#" id="link">Click Me!</a><br /> <span id="greeting"></span> </body> </html> 4. Add the following<script> element to the<head> section. NOTE: Use the jQuery version number that matches the file name of the file you downloaded in Step 1....
solve questions by using fortoran.90 6. Consider the Fibonacci series: 1 1 2 3 5 8 13 ... Each number in the series (except the first two, which are 1) is the sum from the two previous numbers. Write a program that reads in an integer limit, and which prints the first limit terms of the series. Use an nested if block structure. (You need to distinguish between several cases: limit<0, limit=1, etc.) 7. Rewrite the previous program using a...
(1 2 3 4 5 6 7 8 2. Let o = 4. LALO (5 4 76 2 18 3) a. Write o as a product of disjoint cycles. b. Compute ord(o) = the order of o in Sg.
(1 point) Let f and g be permutations on the set {1, 2, 3, 4, 5, 6, 7}, defined as follows (1 2 3 4 5 6 7 JE (3 1 6 5 7 2 4) f = (1 800 2 5 3 4 4 7 5 3 6 2 7 6) Write each of the following permutations as a product of disjoint cycles, separated by commas (e.g. (1,2), (3,4,5), ... ). Do not include 1-cycles (e.g. (2)) in your...
There are 5! numbers that can be written with the digits 1, 2, 3, 4, 5, such that no digit is repeated. Suppose that these numbers are listed in increasing order (12345, 12354, 12435, 12453, . . .). (a) In this list, what is the position of the number 35421? (b) What is the 100-th entry in the list?
On question 1-3 can you please answer each script separately. Please Use Perl Scripting 1. write a program that computes the circumference of a circle with a radius of 12.5. Circumference is 2π times the radius (approximately 2 times 3.141592654). The answer you get should be about 78.5. 2. Modify the program from the previous exercise to prompt for and accept a radius from the person running the program So, if the user enters 12.5 for the radius, she should...