Run Code
|
API
|
Code Wall
|
Users
|
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
Please
log in
to post a comment.
Gauss v1.1
e-olymp.com---problem1590---Birthday 2
4
printAllPathsInMatrix
area of a circle using pointer
reverseKNode
binary
MAC
cvcvcvcvv
test
Please log in to post a comment.