Advertisement
pavsavov

u6 - 20 November 2016 - Evening

Mar 11th, 2017
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class u6 {
  4. public static void main(String[] args) {
  5.  
  6. Scanner scanner = new Scanner(System.in);
  7.  
  8. int n1 = Integer.parseInt(scanner.nextLine());
  9. int n2 = Integer.parseInt(scanner.nextLine());
  10. int nEnd = Integer.parseInt(scanner.nextLine());
  11. int nControl = n2 - (n2 - n1);
  12.  
  13. for (int i = 0; i < nEnd; i++) {
  14. System.out.print("<" + n1 + "-" + nControl + ">");
  15. while (!(nControl >= n2)) {
  16. nControl++;
  17. break;
  18. }
  19. }
  20.  
  21. }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement