shohel rana

Greenhorn
+ Follow
since May 27, 2008
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by shohel rana

I am facing same problem. Any one please help.

Richard Tookey wrote:This is trivially done using the substring() and length() methods of String and String concatenation.


Yes, I have done it using substring() and length() methods of String and String concatenation.

Thank for your advice.
10 years ago
Hi Experts,
Say "1000000" is a string. Now I wanna print it as 1000-000. I mean before the last three digit a hyphen(-) will be added. If it is less than three digit then required number of zero(0) would be added before to form it three digit.

For more elaboration, I require the following,
0----------------------------> -000
1----------------------------> -001
10--------------------------> -010
100------------------------> -100
1000-----------------------> 1-000
10000---------------------> 10-000
100000-------------------> 100-000
1000000-----------------> 1000-000
10000000---------------> 10000-000
100000000-------------> 100000-000
1000000000-----------> 1000000-000
10000000000---------> 10000000-000

Please help me to do it.
10 years ago