programming test 1 - cout<<"Please try...

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

View Full Document Right Arrow Icon
Sheet1 Page 1 //Cheu Lee programming test 2 #include<iostream> #include<cmath> using namespace std int main() { double c, d c=5*6 cout<<"What is 5 * 6?"<<endl cin>>d if(d==c){ cout<<"Great! Your answer is correct."<<endl } else { cout<<"Sorry, it is wrong!"<<endl
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: cout<<"Please try again."<<endl } cout<<"What is 5 * 6?"<<endl cin>>d if(d==c){ cout<<"Great! Your answer is correct."<<endl } else { cout<<"Sorry, you are out of luck today!"<<endl cout<<"The answer is 30"<<endl } return 0 }...
View Full Document

This note was uploaded on 05/16/2010 for the course CISCO EST61 taught by Professor Miller during the Spring '10 term at Fresno City College.

Ask a homework question - tutors are online