SHARE
TWEET

Untitled

a guest Oct 13th, 2019 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class CandyCount{
  2.  
  3.   public static void main(String[] args){
  4.  
  5.     double money = 12.4;
  6.     double price = 1.2;
  7.     int candies = 0;
  8.  
  9.     if(money > 0 && price > 0);
  10.       while(money - price >= 0){
  11.         candies += 1;
  12.         money -= price;
  13.       }
  14.  
  15.     System.out.println(candies);
  16.   }
  17.  
  18. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top