├── README.md └── happy no /README.md: -------------------------------------------------------------------------------- 1 | # HAPPY-NUMBER 2 | A C program to check if a number is a "happy number" typically involves defining a function that repeatedly calculates the sum of the squares of the digits of the number until either the sum becomes 1 or the process loops endlessly without reaching 1. Here's a description of the steps involved: 3 | -------------------------------------------------------------------------------- /happy no: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main() { 4 | int a,b,c,last=0,sum=0; 5 | scanf("%d",&a); 6 | c=a; 7 | while(a>0){ 8 | a=a/10; 9 | b=b+1; 10 | } 11 | for(int i=0;i