Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package ma.test;
- public class NotenproblemMa {
- public static void main(String[] args) {
- float punkteErreicht = 92.0f;
- float punkteMoeglich = 100.0f;
- float in = punkteErreicht / punkteMoeglich;
- final float[][] assoc = {
- {0.96f, 15.0f},
- {0.91f, 14.0f},
- };
- float ret = 0.0f;
- for(int i = 0; i < assoc.length; i++) {
- if(assoc[i][0] <= in) {
- ret = assoc[i][1];
- break;
- }
- }
- System.out.println(ret);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement