Jump to content
SSForum.net is back!

Recommended Posts

Posted

If you want to be able to multiple shipowner money calculations that don't stop at 10k, use this. Here is the code (Java):

 

import javax.swing.JOptionPane;
  public class moneycalc
  {
     public moneycalc()
     {
     }
     public static void main(String[] args)
     {
        String bounty1 = JOptionPane.showInputDialog("Killer Bounty?");
        String bounty2 = JOptionPane.showInputDialog("Killee Bounty?");
        int bty1 = Integer.parseInt(bounty1);
        int bty2 = Integer.parseInt(bounty2);
        int killmoney = (int)(50.0 * ((((float) bty2 + 5.0) / ((float) bty1 + 5.0)) + 1.0));
        String money = "Money earned: $" + killmoney + ".";
     
        System.out.println(money);
     }   
  }

_UU___UU__SSSSS____AAA____UU___UU__SSSSS____AAA___

_UU___UU_SS_______AAAAA___UU___UU_SS_______AAAAA__

_UU___UU__SSSSS__AA___AA__UU___UU__SSSSS__AA___AA_

_UU___UU______SS_AAAAAAA__UU___UU______SS_AAAAAAA_

__UUUUU___SSSSS_AA____AA___UUUUU___SSSSS_AA____AA

J.C. Dento> prime example of why america will never be a world super power.

Moscato> d1 is mad he will never have a job outside subspace

I can't see this because I turned signatures off. ps VT

Posted

I don't know java so I'm not gonna write java code

But something like this should get rid of X/0 problems

Have the code check killerbty for a 0 bounty then force a killerbty=killerbty+1 into the money calculation if possible

The more the light shines through me

I pretend to close my eyes.

The more the dark consumes me

I pretend I'm burning bright.

Posted
it shouldn't need that because you shouldn't be stupid and put stuff in that will break it. Besides, it adds the 5.0

_UU___UU__SSSSS____AAA____UU___UU__SSSSS____AAA___

_UU___UU_SS_______AAAAA___UU___UU_SS_______AAAAA__

_UU___UU__SSSSS__AA___AA__UU___UU__SSSSS__AA___AA_

_UU___UU______SS_AAAAAAA__UU___UU______SS_AAAAAAA_

__UUUUU___SSSSS_AA____AA___UUUUU___SSSSS_AA____AA

J.C. Dento> prime example of why america will never be a world super power.

Moscato> d1 is mad he will never have a job outside subspace

I can't see this because I turned signatures off. ps VT

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...