fork download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. int main(){
  4. int n;
  5. cin>>n;
  6. if (n%2==0)
  7. cout<<"the no. is even"<<endl;
  8. else
  9. {
  10. cout<< "the no. is odd"<<endl;
  11. if (n%5==0)
  12. cout<<"divisible by 5"<<endl;
  13. else
  14. cout<<"not divisible by 5"<<endl;
  15. }
  16. return 0;
  17. }
Success #stdin #stdout 0s 4980KB
stdin
10
stdout
the no. is even