4. C program to print all pronic numbers between 1 to 100.Pronic number is a product of two consecutive integers of the form: n(n+1). For example: Some pronic numbers are: 0, 2, 6, 12, 20, 30, 42, 56 etc. In this program, we need to print all pronic numbers between 1 and 100 by following the algorithm as given below: ALGORITHM:
isPronicNumber(int num)
PROGRAM:Output: Pronic numbers between 1 and 100: 2 6 12 20 30 42 56 72 90
Next TopicC Programs
|