Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
single_digit
#include <iostream> using namespace std; char sum[10]; void single_digit(char n[10]) { for(int i=0; i<=10; i++) { sum = sum + n[i]; } if(sum>=10) { single_digit(sum) } else { cout << "The single digit sum is " << endl << sum; } } int main() { char num[10]; cout << "Enter a number" << endl; cin >> num; single_digit(num); }
run
|
edit
|
history
|
help
0
Patara asoebi
Widget Class with dynamic memory and pointers
threadpool02
next permutation leetcode
Quiz 12/13
TmpFib
Dar
frndclass
1568-1644 Solar eclipses, make 1617(8) and 1620(12) Lunar eclipses the same as Chinese records
PriQTel