class Fibonacci {
public static void main (String args[]) {
int low = 0;
int high = 1;
while (high < 50) {
System.out.println(high);
int temp = high;
high = high + low;
low = temp;
}
}
}
Example
Addition
while loop
Relations
Variable declarations and assignments