| about | help | code help+videos | done | prefs |
LOOPs_countDigit
Given a non-negative integer n and a digit d (0–9), return how many times d appears in n. If the digit d is out of range, return a -1. LOOPs_countDigit(707070, 7) → 3 LOOPs_countDigit(1000, 0) → 3 LOOPs_countDigit(0, 0) → 1 ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Copyright Nick Parlante 2017 - privacy