Created
May 29, 2017 15:22
-
-
Save marzoukali/9ede846cf455472aa350c1053f53d637 to your computer and use it in GitHub Desktop.
C++ Simple Problems 1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int divisionCount = 0; | |
for(int i =1; i<=100;++i) | |
{ | |
if(i % 4 == 0)divisionCount++; | |
else if(i % 6 == 0 && i % 10 == 0) divisionCount++; | |
} | |
cout << divisionCount; // 27 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment