Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
single_digit
//g++ 5.4.0 #include <iostream> using namespace std; int single_digit (int num) { static int sum = 0; if (num<10) { sum = sum + num; return sum; } sum = sum + num%10; single_digit(num/10); //return; } int main() { cout<<single_digit(34)<<endl; }
run
|
edit
|
history
|
help
1
Round prices
KMP substring search
precision and fixed point notation
TempSpecial
Binary search2
Szukanie elementu w niemalejąco posortowanej tablicy używając wyszukiwania binarnego
Web Browser History
lock
Get all anagrams from given words
Member function detection