How do you map integers to strings?

computer info vbscript on With VBScript, you can search and display all these objects. Program ...
computer info vbscript image

Q. Call the function f.

Then f(0) = a, f(1) = b, ..., f(25) = z, f(26) = aa, ... f(701) = zz, f(702)=aaa, ...

I need to write a computer program for this.
Can you provide pseudocode for your solution? In particular, please specify precisely the recursive or iterative part of the algorithm.
Thanks.


Answer
Here's a solution. You can figure out the pseudo-code yourself -- I wouldn't want to do all the work for you!

I don't usually like just handing off complete answers to homework questions, but I was bored and I thought your problem was sort of interesting, so I tried it anyway. You probably should have tried the problem yourself and then asked more specific questions when you got stuck. That would be for your own sake, so you can handle this stuff on a test, without access to the Internet. But anyway, here it goes...

If you're unfamiliar with Visual Basic, here's some explanation of some of the syntax and the built in functions I use (such as Asc and Chr).
http://www27.brinkster.com/saurabhjain/vbscript.htm
And info on C++:
http://www.cplusplus.com/reference/

You can also try searching the Internet for further info.

In the Visual Basic programming language
(it's what I had access to when I first read your question):

Public Function f(ByVal i As Integer) As String
Dim output As String
Dim done As Boolean

output = ""
done = False

i = i + 1

Do While Not done
output = Chr(((i - 1) Mod 26) + Asc("A")) & output
i = i - ((i - 1) Mod 26)
i = i \ 26

If i <= 0 Then
done = True
End If
Loop

f = output
End Function


And in the C++ programming langage
(I personally prefer this language, I was able to translate the function later):

string f(int i)
{
string output = "";
bool done = false;

i = i + 1;

while( !done )
{
output = ((char)(((i-1) % 26) + ((int)'A'))) + output;
i = i - ((i-1)%26);
i = i / 26;

if( i <= 0 )
done = true;
}

return output;
}

how do people create a virus and send it to other computers and steal there information?




dannyj2225


well i read that viruses can go on a computer and then take all your information, but how do they make it or what ever


Answer
--EDIT--
suzie, the correct answer is given in my post. And it is NOT dangerous whatsoever. As long as someone isn't dumb enough to give very specific and detailed information, it's all good.
--END EDIT--

Having anti-virus software DOES NOT put you at little to no risk of receiving a virus. New virii (plural of "virus") are written each day. If you don't update the AV software, you are already at a high risk.

And it takes VERY LITTLE effort to write a virus. You don't have to know a complicated, low-level programming language, such as C++, to write a harmful virus.

Do you remember the "Melissa" virus, or the "I Love You" virus? They were both written in simple VBScript. They attached theirselves to files with .JPG and .MP3 files, to name a few, and renamed theirselves to something.jpg.vbs.

And since the majority of users hide file extensions for known file types, they would then see the .jpg file, for example, as something.jpg, with the real file being something.jpg.VBS, which is a VBScript file.

The virus would then access the Windows Address Book, attach the original file to the e-mail, write a short message, and send itself to ALL contacts in the address book.

Then you have that many more people who are infected with the same virus.

And if you have a virus, you have a virus. There is no "most virii aren't really viruses" to it. Virii range from simple annoyances to very harmful/damaging scripts/software. Don't let anyone mislead you on that one.

They can easily steal information. They can tap into cookies and other stored files, looking for sensitive and personal information.

They can also create a keylogger as part of the virus. A keylogger monitors all key strokes from the "victim's" keyboard. They then instruct the virus to save the information on the local computer, and the virus e-mails that file to an e-mail address.

Or they could create a simple, custom server software, that receives the file. That's a common way to get saved passwords, credit card info., etc.

Why do you think I NEVER save my passwords? HeHe. Like AIM, Yahoo! Msgr., MSN, Windows Live (TM), etc. Even websites, like Yahoo! for e-mail.

I hope you have a good understanding now. =)

E-mail me at the_dadd_from_tn2005@yahoo.com if you have more questions, or if you want to know anything that shouldn't really be discussed publically. And I DO NOT mean, "Hey, can you give me help writing a virus?" or some shit like that. LoL.

But I can give you some general information.




Powered by Yahoo! Answers

Comments :

0 komentar to “How do you map integers to strings?”
 

Sexy Lace Bikini

Leave little to the imagination in this super sexy booty short bikini transparent lace. Adjustable triangle top with peek-a-boo slits ties at neck and back. Matching ruffled booty shorts leave so little to the imagination! 90% Nylon 10% Spandex. Four way stretch means one size fits most. Unlined. Club Wear by Body Zone Read More

LG Scarlet

This event, which was attended by more than 200 media from Middle East and Africa, followed earlier events in Los Angeles and in London that drew celebrities for a mock premiere event to reveal the secret of “Scarlet, The Hit New TV Series,” which had been promoted through broadcast and online trailers.