Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

Why ca not I do something like this?

1013


Explain is it better to use a pointer to navigate an array of values, or is it better to use a subscripted array name?

1220


Tell me what is null pointer in c?

1082


Can you apply link and association interchangeably?

1125


string reverse using recursion

2466


What are terms in math?

1048


Is there any demerits of using pointer?

1075


Linked list is a Linear or non linear explain if linear how it working as a non linear data structures

2180


What are the Advantages of using macro

1177


Why does everyone say not to use gets?

1107


Is it valid to address one element beyond the end of an array?

1175


What are the keywords in c?

1124


Why clrscr is used after variable declaration?

1689


How can you return multiple values from a function?

1116


What is #include stdlib h?

1105