×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Java
Posted by: William Chalifoux
Added: Mar 17, 2021 5:51 PM
Modified: Mar 17, 2021 5:53 PM
Views: 4796
Tags: no tags
  1. double mon;
  2. try{
  3.             System.out.println("Please enter the amount of money ($) to be dividded among the number of friends: ");
  4.             mon=input.nextDouble();  
  5.         }
  6.         catch (IllegalArgumentException e1){
  7.             System.out.println("Bad number format.");
  8.         }