/end triangle /all but //public static string getstring(throws ioexception inputstreamreader isr new inputstreamreader(system in)bufferedreader br new bufferedreader(isr)string br readline()return //public static int getint(throws ioexception string getstring()return integer parseint( )///end class stacktriangleapp this program calculates triangular numbersjust as the triangle java program at the beginning of the did here' some sample outputenter number triangle= figure shows how the sections of code in each case relate to the various parts of the algorithm figure the cases and the step(method the program simulates methodbut it has no name in the listing because it isn' real