Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Blog
problem_solution5
//Microsoft (R) C/C++ Optimizing Compiler Version 19.00.23506 for x64 #include <iostream> int main() { int num; cout<"enter number "; cin>>num; if(num!=0){ result=ftn(num); } } int ftn(int num) { int single_digit=0; for(int i=0;i<=9;i++) { if(num==i) cout<<"number already in 10 "; } elseif(num>10) { // getting the modulas and adding them while(num!=0) { store=num%10; single_digit=store+single_digit return single_digit; } } }
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
VS2013 hello world includes
c++ pure apstraction
iota_30-Seconds-of-C++
MSVC14 <experimental/generator> header
Hangman
Preserving strict aliasing Union example
Template function declaration to avoid usage of template in T::template f<int>()
binary
Runner-mt
#7.2
Please log in to post a comment.