MCPcopy Create free account
hub / github.com/Ayu-99/Data-Structures / addDigits

Method addDigits

Leetcode Challenge/February/cpp/Add Digits.cpp:17–20  ·  view source on GitHub ↗

int addDigits(int num) { int sum=0; while(num>9) { while(num) { sum+=(num%10); num/=10; } num=sum; sum=0; } return num; }

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected