Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Problem_onoff_3
//Microsoft (R) C/C++ Optimizing Compiler Version 19.00.23506 for x#include<iostream> //code compile on visual studio 2013 using namespace std; void main(void) { int a, number, Multiple; cout << "Please enter the number from 1 to 100" << endl; cin >> number; if (number % 3 == 0 && number % 5 == 0) { cout << "onoff" << endl; } else if (number % 3 == 0) { cout << "on" << endl; } else if (number%5 == 0) { cout << "off" << endl; } else { cout << number << endl; } getchar(); }
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
Double_wrapper vc++
Redeclare with auto
VC++ fail
#27
Zero length array as a class member
Use std::is_base_of to subset STL container contents.
Spirit Lex combining token_id's with semantic actions
Copy double[2][3] into vector<vector<double>>
#21.2
Copy initialization: overload resolution issue
Please log in to post a comment.