Created
May 3, 2020 12:02
-
-
Save Devcodpanda/8f333a7866bfddf9d1f9ccf9fa435a62 to your computer and use it in GitHub Desktop.
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
class CandyCount { | |
public static void main(String[] args) { | |
double money = 12.4; | |
double price = 1.2; | |
int Candies = 0; | |
if(money>0 && price>0){ | |
while((money-price)>=0){ | |
Candies=Candies+1; | |
money=money-price; | |
} | |
} | |
System.out.println(Candies); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment