18:03 if example | |
#include <iostream> #include <string> #include <sstream> using namespace std; int main() { int value1, value2, m; string b="Enter a number: "; string a; cout<<b; getline(cin,a); stringstream(a)>>value1; cout<<b; getline(cin,a); stringstream(a)>>value2; m=value1*value2; if (m>50) cout<<"m > 50 and is equal to "<<m; else if (m<50) cout<<"m < 50 and is equal to "<<m; else cout<<"m = 50";cin.get(); return 0; } | |
|
Total comments: 0 | |