diff --git a/Part-1/challenge.js b/Part-1/challenge.js index da0af63..9a5671c 100644 --- a/Part-1/challenge.js +++ b/Part-1/challenge.js @@ -1,2 +1,18 @@ // Good Luck! You got this 💪🏾 // Write your code here. + +var bill = prompt("Enter bill amount ?"); + +var tip; + +if (bill >= 50 && bill <= 300) { + tip = bill * 0.15; + console.log("tip for 15%", tip); +} else { + tip = bill * 0.2; + console.log("tip for 20%", tip); +} + +var total = bill + tip; + +console.log(`the bill was ${bill} , the tip ${tip}, and the value is ${total}`); diff --git a/Part-1/tip.html b/Part-1/tip.html new file mode 100644 index 0000000..0831cf2 --- /dev/null +++ b/Part-1/tip.html @@ -0,0 +1,12 @@ + + +
+ + + +