1.实心三角形 代码: import java.util.Scanner; public class Test { public static void main(String[] args) { int rows; Scanner sc = new Scanner(System.in); System.out.println("Please input rows:"); rows = sc.nextInt(); sc.close(); for (int i = 1; i <=
print "I have a proble! And here is at Line: %s"%sys._getframe().f_lineno PDB,哈哈http://docs.python.org/library/pdb.html import fileinput fileinput.filename() import srcinfo print ('warning: %s: %d: %s' %(srcinfo.file(), srcinfo.line(), x)) 绝对路径
一.打印效果 二.实现代码汇总 为了方便初学者对代码的理解,建议熟练t1到t5为各种三角的打印,然后再进行菱形的打印实现. package circulationDemo; import java.util.Scanner; public class Test { public static void main(String[] args) { Scanner input = new Scanner(System.in); System.out.println("请输入要打印的行数:"