Mirki mam taki algorytm do rozwiązania "index = 0.0588 * L - 0.296 * S - 15.8
where L is the average number of letters per 100 words in the text, and S is the average number of sentences per 100 words in the text.". Zaimplementowałem to w ten sposób i nie rozumiem gdzie mam błąd.
float L = letters/words*100;
float S = sentences/words*100;
int index = 0.0588 * L - 0.296
where L is the average number of letters per 100 words in the text, and S is the average number of sentences per 100 words in the text.". Zaimplementowałem to w ten sposób i nie rozumiem gdzie mam błąd.
float L = letters/words*100;
float S = sentences/words*100;
int index = 0.0588 * L - 0.296





Dlaczego spoj tego nie przyjmuje? Chodzi o pętle?
https://paste.ofcode.org/cUGfbjLcF2N86R3DNzi9iz
https://pl.spoj.com/problems/CALC/