用java 代码输出一个五角星
时间: 2024-05-11 14:15:40 浏览: 112
用java打印的一个五角星
5星 · 资源好评率100%
Sure, here is a Java code to output a five-pointed star:
```
public class Star {
public static void main(String[] args) {
System.out.println(" * ");
System.out.println(" *** ");
System.out.println(" ***** ");
System.out.println("*******");
System.out.println(" ***** ");
}
}
```
I hope that helps! Do you have any other questions for me?
阅读全文