Advertisement
Guest User

Untitled

a guest
Apr 21st, 2014
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.90 KB | None | 0 0
  1. package javaapplication1;
  2.  
  3. import javax.swing.JOptionPane;
  4.  
  5. /**
  6.  *
  7.  * @author borut
  8.  */
  9. public class JavaApplication1 {
  10.  
  11.     /**
  12.      * @param args the command line arguments
  13.      */
  14.     public static void main(String[] args) {
  15.        
  16.  
  17.  
  18.         String ime = JOptionPane.showInputDialog("Vnesi ime:");
  19.     // Worst case scenario, only glasniki
  20.         //char name[] = new char[ime.length() * 5];
  21.         String Samoglasniki="aeiou";  
  22.         char Sg[] =new char[Samoglasniki.length()];
  23.    
  24.     for(int j = 0; j < ime.length(); j++)
  25.     {  
  26.         // Print the letter
  27.         System.out.pring(ime[i]);
  28.         // Check the letter is a glasniki
  29.         for (int i = 0; i < Sg.length(); i ++)
  30.                 {
  31.             // If it is, print it 4 more times (total makes 5)
  32.                     if (ime.charAt(j) == Sg.charAt(i))
  33.                 for (int repeat = 0; repeat < 4; repeat ++
  34.                     System.out.print(ime[j]);
  35.         }
  36.     }
  37.    
  38.     return 0;
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement