programming test 1 -...

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&lt;&lt;&quot;Please try again.&quot;&lt;&lt;endl } cout&lt;&lt;&quot;What is 5 * 6?&quot;&lt;&lt;endl cin&gt;&gt;d if(d==c){ cout&lt;&lt;&quot;Great! Your answer is correct.&quot;&lt;&lt;endl } else { cout&lt;&lt;&quot;Sorry, you are out of luck today!&quot;&lt;&lt;endl cout&lt;&lt;&quot;The answer is 30&quot;&lt;&lt;endl } return 0 }...
View Full Document

Ask a homework question - tutors are online