Algorithm of the day #18: Count Total number of zeros from 0 up to n? In one solution set n = 100. #w3Develops #100DaysofCode #Tech #freeCodeCamp #Programming #Algorithms #JavaScript #Code #CodeNewbie #Programming #AlgorithmsDaily
1
5
3
0
0
static int count(int num){ int count = 0; int temp, rem; for(int i=num; i>0; i--){ temp = i; while(temp>0){ rem = temp%10; temp = temp/10; if(rem==0) count++; } } return count; }
0
0
1
0
0
United States Trends
- 1. #AEWDynamite 16.9K posts
- 2. #Survivor49 2,757 posts
- 3. #SistasOnBET 1,971 posts
- 4. #iubb 1,656 posts
- 5. #ChicagoFire 1,353 posts
- 6. Athena 10.9K posts
- 7. Binnington 1,962 posts
- 8. Savannah 5,328 posts
- 9. Godzilla 28.7K posts
- 10. Mitchell Robinson 1,048 posts
- 11. Ovechkin 6,817 posts
- 12. Unplanned 4,304 posts
- 13. Randle 3,186 posts
- 14. Harley 11.8K posts
- 15. Lamar Wilkerson N/A
- 16. Cade Cunningham 2,322 posts
- 17. Claudio 49.6K posts
- 18. Andi 9,752 posts
- 19. Paige 28.3K posts
- 20. Josh Okogie N/A
Loading...
Something went wrong.
Something went wrong.