Personal blog written from scratch using Node.js, Bootstrap, and MySQL. https://jrtechs.net
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
512 B

  1. #THIS IS A H1
  2. This page is merely for testing -- go away
  3. ```
  4. include <stdio.h>
  5. void main(int argc, char * argv[])
  6. {
  7. int vals[1000];
  8. //value will overflow a 32 bit int!!!
  9. long int max = 0;
  10. char * data = argv[1];
  11. for(int i = 0; i < 1000; i++)
  12. {
  13. vals[i] = (int)data[i] - 48;
  14. }
  15. for(int i = 0; i < 1000 - 13; i ++)
  16. {
  17. long int tempMax = 1;
  18. for(int t = i; t < i + 13; t++)
  19. {
  20. tempMax *= vals[t];
  21. }
  22. if(tempMax > max)
  23. {
  24. max = tempMax;
  25. }
  26. }
  27. printf("the max number is %ld", max);
  28. }
  29. ```