Kean.edu
General
Home
About
Educational
Kean University
MSAS5004
Intro to Programming
MSAS5040
Intro to e-Business
MSAS5104
Intro to Programming
MSAS5302
Decision Support Systems
MSAS5599
Web Site Design
Caldwell College
CS115
Intro to Computers
CS185
Intro to Programming
Business
Recycled Fiber Apparel
Little Jammies
Tie Dye Mania
Just Neon Tees
No Buttons Required
Panda Apparel LLC
Betty Boop Gear
Panda Imprinting
Custom Printed Boxers
Custom Printed Lounge Pants
Panda Formals
DSM Internet Services

 

Assignment 1

A simple number game

  1. Select a favorite number between 1 and 9
  2. Triple the number
  3. Triple the number again
  4. Multiply it by 12345679
  5. The result should be your favorite number repeated 9 times

Example 4 x 3 is 12, 12 x 3 is 36, 36 x 12345679 is 444444444

The homework is to implement the number game as described above. Declare the number and your name as named constants in the program. The program should output to the screen your name, favorite number and the result of the calculations.

Input:

  • none

Output:

My name is: your name
My favorite digit is: digit
My favorite digit repeated 9 times is: result

Turn in:

  1. Program listing
  2. Program output

 


Copyright© 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 All rights reserved.