Linux-Fan

Notenproblem

Jan 24th, 2012
118
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package ma.test;
  2.  
  3. public class NotenproblemMa {
  4.     public static void main(String[] args) {
  5.         float punkteErreicht = 92.0f;
  6.         float punkteMoeglich = 100.0f;
  7.         float in = punkteErreicht / punkteMoeglich;
  8.        
  9.         final float[][] assoc = {
  10.             {0.96f, 15.0f},
  11.             {0.91f, 14.0f},
  12.         };
  13.         float ret = 0.0f;
  14.         for(int i = 0; i < assoc.length; i++) {
  15.             if(assoc[i][0] <= in) {
  16.                 ret = assoc[i][1];
  17.                 break;
  18.             }
  19.         }
  20.         System.out.println(ret);
  21.     }
  22. }
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×