Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class taskOne{
- public static void main(String args[]){
- int previous = Integer.parseInt(args[0]);
- System.out.print(previous + " ");
- for(int i = 1 ; i < args.length ; i++){
- int next = Integer.parseInt(args[i]);
- if(next != previous){
- previous = next;
- System.out.print(previous + " ");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement