Assignment1CS 120 Assignment # 1ObjectiveWrite, debug and run a Java program using DrJava. Project Specifications1. Your program must be of the form used in lab 2. Call your program Assignment1.java 2. At the top of the program use comments to describe it and the authors name (you!). 3. Write a program that will provide an output as shown below. DO NOT use spaces to position the stars! 4. After the triangles, provide a message that displays the product of the first 10 digits. 5. Display your name as part of the output. 6. Display the product of the first 10 digits excluding 0. Final TouchesMake sure your program works correctly and that you have implemented all the required specifications. Due DateUpload the source code Assignment1.java through Blackboard Sep 21 by 11:59 pm. IMPORTANT SUBMISSION INSTRUCTIONS:1. In blackboard click on Assignments – Assignment1 – at the bottom of the document click on View/Complete Assignment: A1 to upload your file. 2. Use the BROWSE button to find the file. Select it and click on the Submit button. If you have trouble with this assignment PLEASE come to see me! | ||
A1 >> View/Complete Assignment: A1 | ||
Solution /* * This program draws triangles and provides the answer to a problem. * Author: Prof. Steiger-Escobar * */ public class Assignment1 { public static void main(String[] args) { System.out.println("\t*\t********"); System.out.println("\t**\t*******"); System.out.println("\t***\t*****"); System.out.println("\t****\t****"); System.out.println("\t*****\t***"); System.out.println("\t*******\t**"); System.out.println("\t********\t*"); ////calculate the product of the first 10 digits// System.out.println("\n\nThe product of 1*2*3*4*5*6*7*8*9*10 = " + ( 1*2*3*4*5*6*7*8*9*10) ); } } |
I am student of CIS at - Massachusetts Bay College - Massbay, Wellesley, MA. I would like to share some of my classes, so who is interested in learn computation, feel free to copy, and exchange information. Também falo português e hablo un poquito del español. Nil, 12/11/2010
Total de visualizações de página
sábado, 11 de dezembro de 2010
Display 2 triangles, up side down
Assinar:
Postar comentários (Atom)
Nenhum comentário:
Postar um comentário