Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <body>
- <script type= "text/javascript">
- // Program name: max of three
- // Pourpoe: to see if math.max() command will argue 3 numbers
- // Author: Alexander Pannunzio
- // Date last modified: 14/2/2016
- // Decalring variables
- var sales1;
- var sales2;
- var sales3;
- var finalAmount;
- // Welcome the user
- document.write("Welcome to the math.max program");
- // get input from the user
- sales1= prompt("Please enter the sale amount 1");
- //gets value for sakes 1
- sales2= prompt("Now enter the sale amount 2");
- // gets value for sales2
- sales3= prompt("Lastly enter the sale amount 3");
- // gets value for sales 3
- parseFloat(sales1);
- parseFloat(sales2);
- parseFloat(sales3);
- finalAmount= math.max(sale1, sales2, sales3); // deals with the values mathmaticly
- // display the final results
- document.write("The Result is " + finalAmount);
- // closing the program
- document.write("Thanks for using my Program!");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement