fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5.  
  6. int n;
  7. cout << "Enter the number you wish to divide by 7";
  8. cin >> n;
  9. if ( n % 7 == 0 )
  10. cout << " The number is divisible by 7.";
  11. else
  12. cout << " The number is not divisible by 7.";
  13.  
  14. return 0;
  15. }
Success #stdin #stdout 0s 3344KB
stdin
21
stdout
Enter the number you wish to divide by 7 The number is divisible by 7.