class star
{
public static void main(String[] args)
{
int number=Integer.parseInt(args[0]);
if (number>=1&number<=20)
{
System.out.print("1-20");
}
else if (number>20&number<=40)
{
System.out.print("21-40");
}
else if (number>40&number<=60)
{
System.out.print("41-60");
}
else if (number>60&number<=100)
{
int row,colum;
for(row=1;row<=5;row++)
{
for(colum=1;colum<=30;colum++)
{
if(row==2|row==3|row==4)
{
if(colum>3&colum<28)
{
System.out.print(" ");
}
else System.out.print("*");
}
else{
System.out.print("*");}
}
System.out.print("\n");
}
}
else System.out.print("Your intput out of rang.\nPlease Input number between 1-100.");
}
}
สมัครสมาชิก:
ส่งความคิดเห็น (Atom)
Install SonarQube on windows 11 and scan quility source code on local machine
Download SonarQube on web www.sonarsource.com Extract File Copy Folder to new directory , If you want to move. Go to Dowload load jdk ver ...
-
วิธีแก้ 1. ไปที่ Control Panel 2. ที่มุมขวาบน เลือก View by : category 3. ที่หัวข้อ Programs เลือก Uninstall a program 4. ที่แถบซ้าย...
-
Ex. 1 การคูณ .model small .stack 100h .data X equ 3 Y equ 3 Z equ 2 .code ;X+Y-2Z+1 Main pro...
-
1. Go to folder apache tomcat for example : C:\apache-tomcat-7.0.84\conf 2. Open file tomcat-users.xml by Note...
ไม่มีความคิดเห็น:
แสดงความคิดเห็น