Advertisement
Guest User

Untitled

a guest
Jan 20th, 2020
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1.  
  2. public class Tulostin {
  3.  
  4. public static void main(String[] args) {
  5. // Tässä voit testata metodia
  6. int[] taulukko = {5, 1, 3, 4, 2};
  7. tulostaTaulukkoTahtina(taulukko);
  8. }
  9.  
  10. public static void tulostaTaulukkoTahtina(int[] taulukko) {
  11. // Kirjoita tulostuskoodi tänne
  12. for(int i: taulukko) {
  13. while(i <= taulukko.length) {
  14. System.out.print("*");
  15. i++;
  16. }
  17. System.out.println("");
  18. }
  19.  
  20. }
  21.  
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement