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
Can we compile a program without main() function?
What is the difference between class and object in c?
A program is required to print your biographic information including: Names, gender, student Number, Cell Number, line of study and your residential address.
What does a function declared as pascal do differently?
Explain what is the general form of a c program?
Write a program to input the price of 1 burger and the number of burgers eaten by a group of friends .print the total amount to be paid by the group?
write a program which the o/p should b in such a way that s triangle if I/p is 3,a Square/rectangle if I/P=4,a pentagon if I/P=5 and so on...forget about the I/P which is less than 3
What’s the special use of UNIONS?
hi, which software companys will take,if d candidate's % is jst 55%?
Explain how does free() know explain how much memory to release?
explain what is fifo?
What does != Mean in c?
Can variables be declared anywhere in c?
write a programming in c to find the sum of all elements in an array through function.
Explain what are the different file extensions involved when programming in c?