Skip to content

Instantly share code, notes, and snippets.

@Yurlov
Created June 17, 2016 12:54
Show Gist options
  • Save Yurlov/4fcde78c5fabb79eacecc46deb3483a2 to your computer and use it in GitHub Desktop.
Save Yurlov/4fcde78c5fabb79eacecc46deb3483a2 to your computer and use it in GitHub Desktop.
Prog.kiev.ua
import java.util.Scanner;
public class EvenRangePrinter {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int first = in.nextInt();
int last = in.nextInt();
if (first<last){
for (int i= first;i<last;i++){
i += 1;
System.out.print(i);
}
}else
System.out.println("");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment