Felanpro

uppgift82

Nov 19th, 2020
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. /*
  2. * To change this license header, choose License Headers in Project Properties.
  3. * To change this template file, choose Tools | Templates
  4. * and open the template in the editor.
  5. */
  6. package skola;
  7. import java.util.Scanner;
  8. /**
  9. *
  10. * @author Felix 1
  11. */
  12. public class Uppgift82 {
  13.  
  14. /**
  15. * @param args the command line arguments
  16. */
  17. public static void main(String[] args) {
  18. Scanner inmatning = new Scanner(System.in);
  19. int[] fält = new int[5];
  20.  
  21. for(int i = 1; i <= 5; i++)
  22. {
  23. fält[i - 1] = i;
  24. }
  25.  
  26. for(int i = 4; i >= 0; i--)
  27. {
  28. System.out.println(fält[i]);
  29. }
  30. }
  31.  
  32. }
  33.  
Add Comment
Please, Sign In to add comment