JAVA_CODINGS Telegram 56
41. Triangle Pattern.

import java.io.*;

class Triangle
{
public static void main(String arg[])
{
InputStreamReader istream = new InputStreamReader(System.in);
BufferedReader read = new BufferedReader(istream);
System.out.println("Enter Triangle Size : ");
int num = 0;
try
{
num = Integer.parseInt(read.readLine());
}
catch (Exception Number)
{
System.out.println("Invalid Number!");
}

for (int i = 1; i <= num; i++)
{
for (int j = 1; j < num - (i - 1); j++)
{
System.out.print(" ");
}

for (int k = 1; k <= i; k++)
{
System.out.print("*");
for (int k1 = 1; k1 < k; k1 += k)
{

System.out.print("*");
}
}

System.out.println();
}
}
}

@java_codings



tgoop.com/java_codings/56
Create:
Last Update:

41. Triangle Pattern.

import java.io.*;

class Triangle
{
public static void main(String arg[])
{
InputStreamReader istream = new InputStreamReader(System.in);
BufferedReader read = new BufferedReader(istream);
System.out.println("Enter Triangle Size : ");
int num = 0;
try
{
num = Integer.parseInt(read.readLine());
}
catch (Exception Number)
{
System.out.println("Invalid Number!");
}

for (int i = 1; i <= num; i++)
{
for (int j = 1; j < num - (i - 1); j++)
{
System.out.print(" ");
}

for (int k = 1; k <= i; k++)
{
System.out.print("*");
for (int k1 = 1; k1 < k; k1 += k)
{

System.out.print("*");
}
}

System.out.println();
}
}
}

@java_codings

BY Advance Java πŸ‘¨β€πŸ’»


Share with your friend now:
tgoop.com/java_codings/56

View MORE
Open in Telegram


Telegram News

Date: |

The imprisonment came as Telegram said it was "surprised" by claims that privacy commissioner Ada Chung Lai-ling is seeking to block the messaging app due to doxxing content targeting police and politicians. Add the logo from your device. Adjust the visible area of your image. Congratulations! Now your Telegram channel has a face Click β€œSave”.! Hui said the messages, which included urging the disruption of airport operations, were attempts to incite followers to make use of poisonous, corrosive or flammable substances to vandalize police vehicles, and also called on others to make weapons to harm police. The channel also called on people to turn out for illegal assemblies and listed the things that participants should bring along with them, showing prior planning was in the works for riots. The messages also incited people to hurl toxic gas bombs at police and MTR stations, he added. Telegram users themselves will be able to flag and report potentially false content.
from us


Telegram Advance Java πŸ‘¨β€πŸ’»
FROM American