+ 1
Pronic Number
2 Answers
+ 19
submit it in comments of this assignment
//no need to create a new thread for that
https://www.sololearn.com/learn/4727/?ref=app
+ 1
# include <stdio.h>
# include <stdlib.h>
int main()
{
int prno,i,n,flg;
printf("\n\n Check whether a number is a Pronic Number or Heteromecic Number or not: \n");
printf(" ----------------------------------------------------------------------------\n");
printf(" Input a number: ");
scanf("%d",&prno);
for(i=1;i<=prno;i++)
{
if(i*(i+1)==prno)
{
flg=1;
break;
}
}
if(flg==1)
{
printf(" The given number is a Pronic Number.\n");
}
else
{
printf(" The given number is not a Pronic Number.\n");
}
}