-4
import javax.swing.*;
class A1{
public static void main(String args[]) {
String z= "";
String a = JOptionPane.showInputDialog(null,"Enter no");
int b = Integer.parseInt(a);
for (int i = 1 ;i <=b ; i++){
z += "*" ;}
JOptionPane.showMessageDialog(null,"\n"+z);
}}
它不是沃金正确,请帮助 – Waseem
什么工作不正常?你在期待什么? – Kai
* ** *** **** ***** 我想要金字塔星 – Waseem