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