/** Suggested answer number 2 to Q8 on H09, S13. This is possible since the introduction of printf into Java in a later version than our textbook. @author P. Conrad */ public class Q8a { public static void main (String [] args) { int i; for (i=0; i<=10; i++ ) { double value = Math.sin(i/10.0) * (2 * Math.PI); System.out.printf("i=%3d value=%6.3f\n", i, value); } } }