Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /******************************************************************************
- Online Java Compiler.
- Code, Compile, Run and Debug java program online.
- Write your code in this editor and press "Run" button to execute it.
- *******************************************************************************/
- import java.util.Arrays;
- import java.util.Scanner;
- public class Riya{
- public static void main(String args[]){
- Scanner sc=new Scanner(System.in);
- try{
- int a[]=new int[5];
- System.out.print("Enter values: ");
- for(int i=0;i<5;i++) a[i]=sc.nextInt();
- try{
- int divider;
- System.out.print("Enter divider: ");
- divider = sc.nextInt();
- System.out.println(a[3]/divider);
- }
- catch(Exception e){
- System.out.println(e);
- }
- }
- catch(Exception e){
- System.out.println(e);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement