Check out example codes for "pronic number in java". It will help you in understanding the concepts better.

Code Example 1

import java.util.Scanner;
public class PronicNumberJava
{
   public static void main(String[] args)
   {
      Scanner sc = new Scanner(System.in);
      System.out.print("Please input a number: ");
      int number = sc.nextInt();
      int pronic = 0;
      for(int p = 0; p < number; p++)
      {
         if(p * (p + 1) == number)
         {
            pronic = 1;
            break;
         }
      }
      if(pronic == 1)
      {
         System.out.println(number + " is a pronic number.");
      }
      else
      {
         System.out.println(number + " is not a pronic number.");
      }
      sc.close();
   }
}

Learn ReactJs, React Native from akashmittal.com