A Java servlet class ?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • danielmessick
    New Member
    • Mar 2010
    • 9

    A Java servlet class ?

    Hey everyone, I'm trying to generate two random numbers between 1 and 5 inclusive and displays the result of their addition, subtraction, multiplication and division?

    For example, something such as:

    4 + 4 = 8

    4 - 4 = 0

    4 * 4 = 16

    4 / 4 = 1
  • arashdx
    New Member
    • Mar 2010
    • 2

    #2
    so what's the relation with servlet?
    first get a number like this

    [code]int a=Math.round(Ma th.random()*10) ;
    int ax=a*a;
    //...other business[code]
    syntax may not be correct because replied it with phone

    Comment

    Working...