skip to main
|
skip to sidebar
Deniii
Monday, March 1, 2010
functie iterativa
#include
int suma(int n)
{int s=0;
while (n!=0)
{s=s+n%10;
n=n/10;}
return s;}
int Suma(int n)
{if (n==0) return 0;
else return n%10+Suma(n/10);}
int main()
{int n;
cin>>n;
cout<
return 0;}
No comments:
Post a Comment
« Older Post
Home
Subscribe to:
Post Comments (Atom)
Blog Archive
▼
2010
(3)
▼
March
(1)
functie iterativa
►
February
(2)
About Me
Deniii
View my complete profile
Followers
No comments:
Post a Comment