Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save marzoukali/648b2e2fbf49e72eceb58755d3499bb3 to your computer and use it in GitHub Desktop.
Save marzoukali/648b2e2fbf49e72eceb58755d3499bb3 to your computer and use it in GitHub Desktop.
c++ - Simple Problems - Second Problem - Third Trial
int count = 0;
for(int x =1; x<=100;++x)
 {
 for(int y = (x > 70 ? x + 1 : 70); y<=200; y++)
 {
 if((x+y) % 7 == 0) count++;
 }
}
cout << count;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment