Exam 2 - A=You are standing B=You are sitting C=You are...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
A=You are standing B=You are sitting C=You are awake ~A^C: You are not standing and you are awake. BvC: You are sitting or you are awake. A->~B: If you are standing, you are not sitting. B->C: If you are sitting, then you are awake. A=I ate fruit B=I ate apples C=I ate beans I ate fruit and I did not eat beans: A^~C I did not eat beans or I ate fruit: ~CvA If I ate apples then I ate fruit: B->A If I ate beans then I did not eat fruit: C->~A Write an if statement that determines when y is at least 20 (it will print “y is at least 20” on the screen) if(y>=20) { document.write(“y is at least 20”) } Write an if statement that determines when the following is NOT true: - a is less than 5 or b is greater than 10 - display a message “Not true” - otherwise display “Is true” if ((a<5)//(b>10)) { document.write(“not true”); } else { document.write(“is true”); } Write a loop that keeps track of how many times the loop has run w/ a variable you create called count . This loop should run at least once and ask
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 09/27/2011 for the course ECON 101 taught by Professor Gottlieb during the Spring '08 term at Rutgers.

Ask a homework question - tutors are online