Skip to content

Instantly share code, notes, and snippets.

@Yur-ok
Created December 13, 2015 17:34
Show Gist options
  • Save Yur-ok/6347031f4c3034f0e752 to your computer and use it in GitHub Desktop.
Save Yur-ok/6347031f4c3034f0e752 to your computer and use it in GitHub Desktop.
package Lesson2.KeyPoint4;
/**
* Created by Юрий on 14.12.2015.
*/
public class PrintNumbers {
public static void main(String[] args) {
printNumbers(5,7);
printNumbers(-2,4);
}
static void printNumbers(int i, int n) {
while (i < n) {
n++;
System.out.println(n);
return;
}
}
}
@liuiv15
Copy link

liuiv15 commented Dec 14, 2015

По заданию нужно было не выход из метода, а изменить данные в условии цикла

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment