repl.it
@mcuringa/

csc-602-lab3

ES6

No description

fork
loading
main.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/* Lab 3
   Complete each problem in the lab in this single
   file. You can comment out your code, once it's
   working.

   When you are done, copy the link to your repl
   to Moodle. The link should be
   with https://repl.it/@[your user name]/[your lab file]

  If you run into any trouble with these problems, you should
  send a direct message to me on Slack.
  I have hints for problems 4 and 5.
 *********************************/

// 1. Ask the user what their favorite color is. Then print
// a message to the console that says:
// <color> is my favorite color too!

// let me get you started!
let color = window.prompt("[edit this with your message]");


// 2. Ask the user how old they are. Then print a message that says:
// Your 100th birthday will be in the year <year>.





// 3. To find the perimiter of a reactangle, you can add the length and the width,
// and then multiply the sum by 2.
// Ask the user for the length and width of a rectangle and then print the perimiter.




// 4. Write a program to help calcuate the restaurant tip on a bill.
// Ask the user to enter the total for the bill, and then ask them
// to enter the percent they want to tip (as a whole number, eg 20 or 15).
// Print out a message that shows: the amount of the tip and the total they
// should leave.





// 5. You are running a lemonade stand. Write a program that calculates your total
// costs and profits if you sell 75 cups of lemonade. If there is any information
// MISSING in this problem description, you should use variables to supply those
// numbers and set them to what you think are reasonable defaults.



Babel Compiler v6.4.4 Copyright (c) 2014-2015 Sebastian McKenzie
?