munchy1988
10-20-2004, 03:23 PM
well, i got bored in class, and made my own little "destry the world program", u kno, the usual.
heres to code for it. im just a beginner so its not that advanced.
class countries
{
public static void main(String[] args)
{
int seconds = 0;
int countries = 0;
int count = 0;
String msg = "";
String msg1= "";
seconds = IO.getInt("How many seconds will the process take?");
while ((seconds<1) || (seconds>50))
{
seconds = IO.getInt("Process is either too long or undefinable. Please re-enter process time");
}
countries = IO.getInt("How many countries?");
if (countries == 1)
{
msg1+= ("1 Billion Chinese People ");
}
if (countries == 2)
{
msg1+= ("China and Germany ");
}
if (countries == 3)
{
msg1+= ("China, Germany, and The Pinko Commies ");
}
if (countries == 4)
{
msg1+= ("China, Germany, Russia, and Japan ");
}
if (countries == 5)
{
msg1+= ("China, Germany, Russia, Japan, and another third world country with terrorists ");
}
if (countries == 6)
{
msg1+= ("China, Germany, Russia, Japan, France, and Mongolia ");
}
if (countries > 6)
{
msg1+= (countries + " countries ");
}
for (count = seconds; count > 0; count--)
{
msg +=(msg1 +"will be demolished in: " + count + '\n');
IO.showMsg(msg);
msg = new String("");
}
IO.showMsg(msg1 + "are now destroyed" + '\n' + '\n' +
"The U.S. government has officially pwn3d you." + '\n' + '\n' +
"**** Cheney now owns all of your assets. Thank you for your participation in this program.");
System.exit(0);
}
}
well, what i want to kno is, instead of making a new IO.showMsg box appear, how can i make it count down to 0 with only the 1 box shoing up? is it even possible to do a thing like this with a time second delay?
**i probably should have mentioned this is in java...srry about that guys.:o
heres to code for it. im just a beginner so its not that advanced.
class countries
{
public static void main(String[] args)
{
int seconds = 0;
int countries = 0;
int count = 0;
String msg = "";
String msg1= "";
seconds = IO.getInt("How many seconds will the process take?");
while ((seconds<1) || (seconds>50))
{
seconds = IO.getInt("Process is either too long or undefinable. Please re-enter process time");
}
countries = IO.getInt("How many countries?");
if (countries == 1)
{
msg1+= ("1 Billion Chinese People ");
}
if (countries == 2)
{
msg1+= ("China and Germany ");
}
if (countries == 3)
{
msg1+= ("China, Germany, and The Pinko Commies ");
}
if (countries == 4)
{
msg1+= ("China, Germany, Russia, and Japan ");
}
if (countries == 5)
{
msg1+= ("China, Germany, Russia, Japan, and another third world country with terrorists ");
}
if (countries == 6)
{
msg1+= ("China, Germany, Russia, Japan, France, and Mongolia ");
}
if (countries > 6)
{
msg1+= (countries + " countries ");
}
for (count = seconds; count > 0; count--)
{
msg +=(msg1 +"will be demolished in: " + count + '\n');
IO.showMsg(msg);
msg = new String("");
}
IO.showMsg(msg1 + "are now destroyed" + '\n' + '\n' +
"The U.S. government has officially pwn3d you." + '\n' + '\n' +
"**** Cheney now owns all of your assets. Thank you for your participation in this program.");
System.exit(0);
}
}
well, what i want to kno is, instead of making a new IO.showMsg box appear, how can i make it count down to 0 with only the 1 box shoing up? is it even possible to do a thing like this with a time second delay?
**i probably should have mentioned this is in java...srry about that guys.:o