forked from ShivangiSingh17/Java-Jet
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
commit middle.java for issue ShivangiSingh17#132
- Loading branch information
Showing
1 changed file
with
16 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import java.util.*; | ||
public class middle{ | ||
public static void main(String[] args){ | ||
Scanner in = new Scanner(System.in); | ||
System.out.println("\nEnter the starting number"); | ||
int a= in.nextInt(); | ||
System.out.println("\nEnter the ending number"); | ||
int b= in.nextInt(); | ||
System.out.println("\nThe even numbers are:"); | ||
for(int j=a+1;j<b;j++) | ||
{if(j%2==0) | ||
System.out.print(j+" "); | ||
} | ||
|
||
} | ||
} |