Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
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
pi
list multiply
base call virtual
Union and possible undefined behavior
VC++ error C2440 with combined use of non-type template parameters
lab1
make_integer_sequence
#9
VC++ '-flag Fail
variable template not supported