Customer Service Chat
Get quote & make Payment
Find error for curious number, Data Structure & Algorithms
int sumFact(int numb);
int calculateFactorial(int digit);
int numb, sumfact;
printf ("Enter a number 1 to 9999\n");
while (!(numb >= 1 && numb <=9999));
sumfact = sumFact(numb);
if (numb == sumfact)
printf("\nThe Number %d you entered is curious number", numb);
printf("\n not a curious number", numb);
int sumFact (int numb)
int rightdigit, sumfact = 0;
while (numb != 0)
rightdigit = numb%10;
numb = numb /10;
sumfact = sumfact + calculateFactorial (rightdigit);
int calculateFactorial (int digit)
if ((digit == 0 ) && (digit == 1))
factval = digit*calculateFactorial (digit-1);
Posted Date: 3/16/2013 4:55:04 PM | Location : United Arab Emirates
Ask an Expert
Find error for curious number, Assignment Help, Ask Question on Find error for curious number, Get Answer, Expert's Help, Find error for curious number Discussions
Write discussion on Find error for curious number
Your posts are moderated
Write your message here..
Linked lists - implementation, The Linked list is a chain of structures whe...
The Linked list is a chain of structures wherein each structure contains data in addition to pointer, which stores the address (link) of the next logical structure in the list.
Algorithm for determining who won rock paper scissors game, Suppose you are...
Suppose you are given the results of 5 games of rock-paper-scissors. The results are given to you on separate pieces of paper; each piece says either 'A' if the first person won, o
Pre-order and post order traversal of a binary tree, The pre-order and post...
The pre-order and post order traversal of a Binary Tree generates the same output. The tree can have maximum One node
If a node having two children is deleted from a binary tree, If a node havi...
If a node having two children is deleted from a binary tree, it is replaced by?? Inorder successor
Cache simulator, how to design a cache simulator with 4-way set associative...
how to design a cache simulator with 4-way set associative cache
Define minimum spanning tree, Define Minimum Spanning Tree A minimum sp...
Define Minimum Spanning Tree A minimum spanning tree of a weighted linked graph is its spanning tree of the smallest weight, where the weight of a tree is explained as the sum
Hash table, Programming for hash table?
Programming for hash table?
Array and two-dimensional array, Q. Describe the term array. How do we rep...
Q. Describe the term array. How do we represent two-dimensional arrays in memory? Explain how we calculate the address of an element in a two dimensional array.
Add the special form let to the metacircular interpreter, (1) (i) Add the ...
(1) (i) Add the special form let to the metacircular interpreter Hint: remember let is just syntactic sugar for a lambda expression and so a rewrite to the lambda form is all t
Infix expression into the postfix expression, Q. Write down an algorithm to...
Q. Write down an algorithm to convert an infix expression into the postfix expression. Ans. Algo rithm to convert infix expression to post fix expression is given as
Accounting Assignment Help
Economics Assignment Help
Finance Assignment Help
Statistics Assignment Help
Physics Assignment Help
Chemistry Assignment Help
Math Assignment Help
Biology Assignment Help
English Assignment Help
Management Assignment Help
Engineering Assignment Help
Programming Assignment Help
Computer Science Assignment Help
IT Courses and Help
Why Us ?
~24x7 hrs Support
~Quality of Work
~Time on Delivery
~Privacy of Work
Human Resource Management
Literature Review Writing Help
Follow Us |
T & C
Copyright by ExpertsMind IT Educational Pvt. Ltd.