/** * Title: Output 9*9 formula. * Time: July 30, 2015 08:09:49 * file: Lianxi16.java * cutter_point */package bishi.zuixin50.t2015730;import java.io.*; public class Lianxi16 {public static void main (string[] args) {FileOutputStream Fos = null;try {//file output stream fos = new FILEOUTPU TStream (New File ("Source/zuixin50/lianxi16output.txt"));//9*9 formulas are 1 to 1, 2 to 2, 3 to 3 ... for (int i = 1; I <= 9; ++i) {//This is the first loop, as a second multiplier for (int j = 1; J <= i; ++j) {//second loop, as the preceding multiplier string s = j + "*" + I + "=" + I * j + "\ T"; Fos.write (S.getbytes ()); Convert to byte stream output}//newline output fos.write ("\ n". GetBytes ());}} catch (Exception e) {e.printstacktrace ();} Finally{try {fos.close ();} catch (Exception E2) {e2.printstacktrace ();}}}}
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
"Written test" 16, output 9*9 formula.