American Airlines baggage fees are as follows: 1st Bag: $25 2nd Bag: $35 3rd Bag
ID: 3583428 • Letter: A
Question
American Airlines baggage fees are as follows: 1st Bag: $25 2nd Bag: $35 3rd Bag: $150 If a bag is more than 50 pounds then the fee doubles (twice as much). Design a website that asks the user to enter the weight of each bag and inform the user the total fees for the bags. User enters 0 if there is no bag. Sample runs are as follows. Submit your html file and screen shots for 3 sample runs with the same input values as the sample run as seen bellow. Use if conditions and validate the inputs if they are blank or not. Design a website using html JavaScript which does the following comparison: Let's make a deal For one month (30 days), I give you $1000 dollars even day if you give me 1 penny the first day, and then every day you double the amount of pennies I have, Calculate how much money will you and I get at the end of the 30 days.Explanation / Answer
Question 13:
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>JavaScript program to calculate multiplication and division of two numbers </title>
<script>
function multiplyBy()
{
var num1 = document.getElementById("firstNumber").value;
var num2 = document.getElementById("secondNumber").value;
var num3 = document.getElementById("thirdNumber").value;
var result1, result2, result3;
if(num1>50){
result1=50;
}else{
result1=num1;
}
if(num2>50){
result2=70;
}else{
result2=num2;
}
if(num3>50){
result3=300;
}else{
result3=num3;
}
var total = result1+result2+result3;
document.getElementById("result").value = total;
}
</script>
</head>
<body>
Enter weight of first bag : <input type="number" id="firstNumber" /><br>
Enter weight of second bag : <input type="number" id="secondNumber" /><br>
Enter weight of third bag : <input type="number" id="thirdNumber" /><br>
The total fees for baggage(s): <input type="number" id="result" /><br>
<input type="button" Value="Total" />
</body>
</html>
Question 14:
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>JavaScript program to calculate multiplication and division of two numbers </title>
<script>
function multiplyBy()
{
var k=1;
for(var i=1;i <30;i++){
k=k*2;
}
document.getElementById("firstNumber").value = 10000*30;
document.getElementById("secondNumber").value = k;
}
</script>
</head>
<body>
You get :<input type="text" id="firstNumber" /><br>
I get : <input type="text" id="secondNumber" /><br>
<input type="button" Value="Total" />
</body>
</html>
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.