C++ Code Basic Programming
Friday, June 27, 2008
//Sum of number as 45 means 9
#include
#include
void main()
{
clrscr();
int a,b,c=0;
cout<<"enter the number: ";
cin>>a;
while(a>0)
{
b=a%10;
c+=b;
a/=10;
}
cout<<"The Result is : "<
getch();
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
Blog Archive
▼
2008
(4)
▼
June
(4)
//last number multiply by 10 as 15 is 50, 23 is 30...
//Sum of number as 45 means 9 #include #include vo...
#include #include int main() { clrscr(); float a,b...
Welcome To C++ World
About Me
Abhijit
View my complete profile
No comments:
Post a Comment