myGully.com

myGully.com (https://mygully.com/index.php)
-   Programmierung (https://mygully.com/forumdisplay.php?f=67)
-   -   Hilfe bei Script (https://mygully.com/showthread.php?t=1997851)

XSnoopi 21.02.10 21:52

Hilfe bei Script
 
Hidiho zusammen,

bräuchte mal hilfe und zwar:

<s***** type="text/javas*****">
function getNumber (){
int x = 25;
int i = 105;
int mod = i%x;
mod = mod *2;
mod = mod -7;
mod = mod + 0,314;
return mod;
}
</s*****>

bekomm ich als zahl 3,314 raus.
Leider is die zahl falsch.

also kurz übern daumen gerechnet is ja

105% 25 = 5
5 *2 = 10
10 -7 = 3
3+ 0,314 = 3,314

hab ich da n fehler drin?
sorry, bin erst am anfang java zu lernen und hab noch net so
n durchblick *gg*

edit: okay, ich weiß nun , != . ;)
kleiner aufmerksamkeitsfehler.

Kann geclosed werden :)


Alle Zeitangaben in WEZ +1. Es ist jetzt 11:17 Uhr.

Powered by vBulletin® (Deutsch)
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.