PizzaPi - piFile.printf("A piece of pi: %." + i +...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
import apsc142.*; public class PizzaPi { public static void main (String[] args) { FileOut piFile = new FileOut("piFile.txt"); if (piFile.writeStatus != piFile.IO_EXCEPTION) { for (int i = 0; i < 25; i++)
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: piFile.printf("A piece of pi: %." + i + "f", Math.PI); } // end if piFile.close(); System.out.println("I am done!"); } // main method } // TestFileIO class...
View Full Document

This note was uploaded on 12/01/2010 for the course APPLIED SC 142 taught by Professor Professorstansimmons during the Winter '10 term at Queens University.

Ask a homework question - tutors are online