/*PRONIC NUMBER IS A NUMBER WHICH A PRODUCT OF TWO CONSECUTIVE NUMBER*/
#include<stdio.h>
main()
{
int a;
int i=1,j,found=0;
printf("Enter any number");
scanf("%d",&a);
while((i*(i+1))<=a)
{
if((i*(i+1))==a)
{
printf("Given no. is pronic, consecutive no. are %d x %d ",i,(i+1));
found=1;
break;
}
i++;
}
if(found==0)
printf("Given no. is not a pronic no.");
}
Nice bro For learning
ReplyDeleteHi bro he is our sir not bro ok?
Delete