View Single Post
  #3 (permalink)  
Old 10-12-2008, 08:04 AM
Eranga's Avatar
Eranga Eranga is online now
Moderator
 
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 5,065
Eranga has a spectacular aura aboutEranga has a spectacular aura about
Send a message via Yahoo to Eranga
Here is a the solution in the first way that Fubarable explain,

Code:
Scanner scn = new Scanner(System.in); String result = null; System.out.println("Enter the value: "); String str = scn.nextLine(); if(str.length() == 1) result = str + "0"; else result = str.substring(0, (str.length() - 2)) + str.charAt(str.length() - 1) + str.charAt(str.length() - 2);
__________________
Use an appropriate Subject. "Help, urgent!" isn't one.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Someone helped you?
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
their helpful post.
Help:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Resources:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Web:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Tips:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Reply With Quote