Back to Browse

C Program to print Strong Number between a given range. #cprogramming #bangla #banglatutorial

154 views
Aug 15, 2024
49:26

* Check whether the given integer number is Strong or not. * Print all the Strong number between a given range. * সি প্রোগ্রামিং এ কিভাবে Strong Number (স্ট্রং নাম্বার) চেক করা যায় এবং একটি নির্দিষ্ট রেঞ্জের ভিতরে সব স্ট্রং নাম্বার প্রিন্ট/প্রদর্শন করা যায়। A strong number is one in which the factorial of each digit of a number equals the original number’s sum. Example of strong number in C: 145 is a strong number. To see if 145 is a strong number, we must compute and add the factorials of its digits: 1! + 4! + 5! = 1 + 24 + 120 = 145 145 is a strong number because the sum of its factorials is equal to the number itself. Algorithm to Find Strong Numbers in 1 to 100 Using the algorithm below, we can find the strong numbers ranging from 1 to 100. Set the variable num to one. While num is less than or equal to 100, repeat the loop. Make a variable sum equal to zero. Iterate over the characters of num after converting it to a string. Calculate the factorial of each character and add it to the total. If sum equals num, print num. Repeat step 2 by increasing the number by one. #cprogrammingtutorial #cprogramming #cprogramminglanguage #cprogrammingbasics #banglatutorial #bangla #universityofscholars #strong

Download

0 formats

No download links available.

C Program to print Strong Number between a given range. #cprogramming #bangla #banglatutorial | NatokHD