Advertisement
Guest User

Untitled

a guest
May 20th, 2019
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class StartWare0003 {
  4.  
  5. public static void main(String[] args) {
  6. // Nama:Patimah Nim:D0217019 kelas:Informatikan.C
  7. Scanner a = new Scanner(System.in);
  8. System.out.println("INPUT: ");
  9. int bil = a.nextInt();
  10. System.out.println("OUTPUT: ");
  11. if (bil >= 1) {
  12. for (int i = 1; i <= bil; i++)
  13. System.out.print(i);
  14. }
  15.  
  16. else {
  17. System.out.print("UNDEFINED");
  18. }
  19.  
  20. }
  21.  
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement