Checkout
checkout
view
Your Cart Your Cart: item(s)
Subjects -> Computer Science -> Other -> Posting #50651
Add to Shopping Cart
$2.19 Instant Download
Computer Science, Other
Year 4

java program


Write a program that reads a social security number written as contiguous digits (for instance, 509435456), uses the charAt method to obtain each character and then prints each digit on a separate line followed by a colon and the digit printed the number of times equal to its value.  Thus the output for 509435456 would be
5:55555
0:
9:999999999
4:4444
3:333
5:55555
4:4444
5:55555
6:666666

Hint: Use a char variable,e.g., index, for the inner loop control variable and write the inner loop as for(char index = '1'; index <= digit; index++) where digit is the char variable used to store the digit taken from the string.

By OTA:  Govind Pal, MCom

OTA Rating:  4.7/5

Your Price:  $2.19  (original value ~$15.96)

What's included:

  • Plain text response
  • Attachment(s):
    • security.java
$2.19 Download Add to Cart

Add to Shopping Cart
$2.19 Instant Download

Page generated in 0.0137 seconds

About Us ·  Contact Us ·  Samples ·  Solutions ·  Legal Terms and Conditions ·  Privacy Policy

©2008 SolutionLibrary.com

Search for Solutions About Us Samples