) BEGIN 5 SET @S='' 8 BEGIN -@I) 10 BEGIN SET @S=@S+' ' END ELSE 14 BEGIN SET @S=@S+'**' 16 END END SET @S =@S+'*' 20 PRINT @S END 结果: ) BEGIN SET @S='' BEGIN -@I) BEGIN SET @S=@S+' ' END ELSE BEGIN SET @S=@S+'**' END END SET @S =@S+'*' PRINT @S END…
package nothh; public class mmm { public static void main(String[] args) { //for循环内的 for按顺序运算,先打印1/4菱形,再打印上1/2菱形,左边空白处用空格代替,右边空白处无输入即可. for(int i = 0; i <= 4; i++) { for(int a = 4; a >= i; a--) { System.out.print(" "); } for(int b = 0;b &l…