fork download
  1. #include <stdio.h>
  2.  
  3. int main()
  4. {
  5. int a = 0;
  6. int b = 0;
  7. int c = 0;
  8. int count = 0;
  9.  
  10. for (a = 1; a < 10; a++)
  11. {
  12. for (b = 0; b < 10; b++)
  13. {
  14. for (c = 0; c < 10; c++)
  15. {
  16. if ((a + b + c) == 8)
  17. {
  18. count++;
  19. }
  20. }
  21. }
  22. }
  23. printf("the count is %d\n", count);
  24. return 0;
  25. }
Success #stdin #stdout 0s 2160KB
stdin
Standard input is empty
stdout
the count is 36