control quiz

SJSU EE30 F15  Quiz 1

First:________________ Last:________________ Last 4 id:_____

Self evaluation (H/M/L):   #1 #2 #3

int score = 40;

if (score > 95)

cout << "Congratulations!\n";

cout << "That's a high score!";

cout << "This is a test!" << endl;

That's a high score!This is a test!

int num = 4;

int total = 50;

if ((num < 5) || ( total > 50))

cout << total << endl;

else cout << num << endl;

50

for ( int i=98; i>=10; i=i-2) {

cout << i;

if ( i %5 ==0) cout << “*”;

cout << “,” ;  // just to separate numbers

}

There are many ways to do this, of course.