id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

dario.sonego@gmail.com esercizi_stringhe > maiusPercent
prev  |  next  |  chance

Percentuale maiuscole
Data una stringa s, si determina la percentuale di lettere maiuscole rispetto alla lunghezza complessiva della stringa. La percentuale restituita è un numero intero tra 0 e 100 (non si arrotonda, si "tronca" la parte decimale).
Attenzione, se la stringa è vuota, restituire -1 ad indicare un'operazione impossibile.


maiusPercent("AA") → 100
maiusPercent("*AA") → 66
maiusPercent("A123456789") → 10

...Save, Compile, Run (ctrl-enter)

int maiusPercent(String s) { }

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Java Help

Misc Code Practice

Difficulty: 205

Copyright Nick Parlante 2017 - privacy