diff --git a/homework.txt b/homework.txt new file mode 100644 index 0000000..ef31e90 --- /dev/null +++ b/homework.txt @@ -0,0 +1,36 @@ +/* The Fortune Teller */ +var N = 10; +var Z = "Basem"; +var X = "Story Teller"; +var Y = "china"; +console.log("You will be a " + X + "in" + Y + ", and married to " + Z + " with " + N + " kids."); +VM1190:5 You will be a Story Tellerinchina, and married to Basem with 10 kids. + + +/*The Age Calculator*/ +var currentYear = 2019; +var birthYear = 1986; +var age = currentyear - birthyear; +console.log("They are either " + age + " or " + (age - 1)); + +/*The Lifetime Supply Calculator*/ +var currentAge = 33; +var maxAge = 90; +var estimateAmount = 5; +var amount = (((maxAge - currentAge)* 365) * estimateAmount); +console.log("You will need " + amount + " to last you until the ripe old age of " + maxAge ); + +/* The Geometrizer */ +var radius = 3; +var circumference = Math.PI * 2*radius; +console.log("The circumference is " + circumference); +var area = Math.PI * radius*radius; +console.log("The area is " + area); + +/*The Temperature Converter*/ +var c = 20; +var f = 34; +var cc = (f - 32)*9/5; +var ff = (c* (9/5)+32) +console.log(c + "°C" + "is" + ff + "°F"); +console.log(f + "°F" + "is" + cc + "°C");