Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Sum of digits of number
#include <iostream> using namespace std; int main() { int n,t,r,sum=0; cout<<"Enter any number : \n"; cin>>n; t=n; while(t>0) { r=t%10; sum+=r; t=t/10; } cout<<"Sum of digits of number "<<n<<" is "<<sum; return 0; }
run
|
edit
|
history
|
help
0
poprawione_i_podzielone_1
ledproject
pointer to template function
Policy based smart pointer
c++_array_size
pranav pandey
Second program
FInd rows with maximum no of 1's
Meeting_Leandro
My Tuple class