Home » Articles posted by krishna

Author Archives: krishna

Mastering Popular Pattern Programs in C

Hollow Square – A square outline made of characters, with empty space inside, perfect for learning nested loops. Plus (+) Pattern – Forms a plus sign by aligning characters horizontally and vertically at the center Cross (X) Pattern – Creates an “X” shape by placing characters diagonally across the square. Number Triangle – Prints numbers […]

Continue Reading →

Happy number program in C

What is a Happy Number?A Happy Number is a number that will eventually reach 1 when replaced by the sum of the squares of each digit repeatedly. If it loops endlessly in a cycle (other than 1), it’s called an Unhappy Number. Example: 📌 Steps to Check a Happy Number in C 📥 Sample Input […]

Continue Reading →

Categories