Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Teste {
- public static void main(String args[]){
- String vogais = "aeiouAEIOU";
- int total = 0;
- String palavra = "Programacao";
- for(int i=0; i<5; i++){
- for(int j=0; j<i; j++){
- if(palavra.substring(i,i+1).equals(vogais.substring(j,j+1))) {
- total++;
- }
- }
- }
- System.out.print("\nTotal: " + total);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement