Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package javaapplication1;
- import javax.swing.JOptionPane;
- /**
- *
- * @author borut
- */
- public class JavaApplication1 {
- /**
- * @param args the command line arguments
- */
- public static void main(String[] args) {
- String ime = JOptionPane.showInputDialog("Vnesi ime:");
- // Worst case scenario, only glasniki
- //char name[] = new char[ime.length() * 5];
- String Samoglasniki="aeiou";
- char Sg[] =new char[Samoglasniki.length()];
- for(int j = 0; j < ime.length(); j++)
- {
- // Print the letter
- System.out.pring(ime[i]);
- // Check the letter is a glasniki
- for (int i = 0; i < Sg.length(); i ++)
- {
- // If it is, print it 4 more times (total makes 5)
- if (ime.charAt(j) == Sg.charAt(i))
- for (int repeat = 0; repeat < 4; repeat ++
- System.out.print(ime[j]);
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement