Ferix

RSOJava#8

Nov 30th, 2020
482
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.26 KB | None | 0 0
  1. public class MyClass {
  2.     public static void main(String args[]) {
  3.        for(float x = 1; x<10; x+=0.5){
  4.             double y = 2*x + 5;
  5.             if(y > 0 && y < 10.1){
  6.                 System.out.println(y);
  7.             }
  8.           }
  9.        }
  10.     }
Advertisement
Add Comment
Please, Sign In to add comment