![]() |
![]() |
|
![]() |
![]() |
|
Programmierung Rat & Tat für Programmierer |
|
Themen-Optionen | Ansicht |
![]() |
#3 |
Inventar
![]() Registriert seit: 13.06.2001
Beiträge: 1.830
|
![]() Ich glaub wohl eher Uni...
Falls du Wirtschaftsinformatik studierst: ansonsten: Code:
private boolean count (String what){ char[]w=what.toCharArray(); int max=3,count=0,i=0; charToCount=w[0]; if (charToCount=='M') max=4; boolean loop=true; while (loop){ if (i<w.length) loop=w[i]==charToCount; count++; i++; } return count<=max; } Jak
____________________________________
Join the DNRC | Godwin\'s Law (thx@stona) Documentation is like sex: If it\'s good, it\'s very, very good. If it\'s bad, it\'s better than nothing. \"In theory, theory and practice are the same. In practice, they are not\" (Lawrence Berra) |
![]() |
![]() |
Aktive Benutzer in diesem Thema: 1 (Registrierte Benutzer: 0, Gäste: 1) | |
|
|