Created
May 29, 2017 15:48
-
-
Save marzoukali/0fbb453252f41f0b4a1dfa2ae3da469c to your computer and use it in GitHub Desktop.
C++ - Simple Problems - Problem 3 - Code Enhance Performance
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 count = 0; | |
for(int a = 0; a < 100; a++) | |
{ | |
for(int b = 0; b < 100; b++) | |
{ | |
for(int c = 0; c < 100; c++) | |
{ | |
int d = 100 - (a + b + c); | |
if(d > 0 && d < 100) count++; | |
} | |
} | |
} | |
cout << count; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment