number 2 plssssss help !!....using array.. turbo c..
create a program that will accept a number and determine if
it is a happy number or an unhappy number..
example:
enter a number : 7
7*7=49
then 4 and 9
4*4 and 9*9== 16 + 18 gives you 97
then 9 and 7
9*9 and 7*7 == 81 + 49 gives you 130
then 1 and 3
1*1 and 3*3 == 1 + 9 gives you 10
1*1 gives you 1
sample output:
7= 49= 16+81= 97= 81+49=130 =1+9=10 =1
"7 is a happy number"
. if the last number is 2 then the number being inputed is
not a happy number.
Answer Posted / wqw
29
| Is This Answer Correct ? | 3 Yes | 3 No |
Post New Answer View All Answers
Why ca not I do something like this?
Explain is it better to use a pointer to navigate an array of values, or is it better to use a subscripted array name?
Tell me what is null pointer in c?
Can you apply link and association interchangeably?
string reverse using recursion
What are terms in math?
Is there any demerits of using pointer?
Linked list is a Linear or non linear explain if linear how it working as a non linear data structures
What are the Advantages of using macro
Why does everyone say not to use gets?
Is it valid to address one element beyond the end of an array?
What are the keywords in c?
Why clrscr is used after variable declaration?
How can you return multiple values from a function?
What is #include stdlib h?