English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

3 answers

Microsoft exle also can do the same.

2007-10-30 04:05:00 · answer #1 · answered by deepak57 7 · 0 0

I'm a C++ guy, not a Java guy, so I don't know the function names you would use, but you should do it by adding a string to itself.

32 * 625 = 20000
2 * 2 * 2 * 2 * 2 = 32
5 * 5 * 5 * 5 = 625

So here's my pseudo code:

string s( name );
s = s + s + s + s + s; // 1 * 5 = 5
s = s + s + s + s + s; // 5 * 5 = 25
s = s + s + s + s + s; // 25 * 5 = 125
s = s + s + s + s + s; // 125 * 5 = 625
s = s + s + s + s; // 625 * 4 = 2500
s = s + s + s + s; // 2500 * 4 = 10000
s = s + s; // 10000 * 2 = 20000
print( s );

2007-10-30 04:14:51 · answer #2 · answered by Neebler 5 · 2 0

You should do your own homework. It is really easy. You have a use of a counter, if statement and what is the last thing you need?

2007-10-30 04:11:54 · answer #3 · answered by Anonymous · 0 0

fedest.com, questions and answers