Advertisement
CamiloCastilla

Untitled

Dec 2nd, 2019
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.44 KB | None | 0 0
  1. package com.company;
  2.  
  3. import java.util.Scanner;
  4.  
  5. public class Main {
  6.  
  7.  
  8.  
  9.     public static void main(String[] args) {
  10.  
  11.         double start = -10;
  12.         double end = 10;
  13.         double by = 0.5;
  14.  
  15.         Scanner keyboard = new Scanner(System.in);
  16.         System.out.println("Count to:");
  17.         double count=0;
  18.         for (double n = start; n <= end; n = n + by) {
  19.             System.out.println(n + "");
  20.         }
  21.     }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement