mathoperationwithsetinteger

mathoperationwithsetinteger - cout <<

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

View Full Document Right Arrow Icon
#include <iostream> using namespace std; int main() { // tests operators +,-,*,/,and %: int m=54; int n=20; cout << "m=" <<m<<"and n=" <<n<< endl; cout << "m+n="<< m+n << endl; // 54+20 =74 cout << "m-n="<< m-n << endl; // 54-20 =34
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;m*n=&quot;&lt;&lt; m*n &lt;&lt; endl; // 54*20 =1080 cout &lt;&lt; &quot;m/n=&quot;&lt;&lt; m/n &lt;&lt; endl; // 54/20 =2 cout &lt;&lt; &quot;m%n=&quot;&lt;&lt; m%n &lt;&lt; endl; // 54%20 =14 } 1 WARNING Output:...
View Full Document

Ask a homework question - tutors are online