Advertisement
Guest User

Untitled

a guest
Nov 20th, 2019
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. //author name : afiqah amir
  2. public class Exercise6 {
  3. public static void main (String[]largs)
  4. {
  5. //declare variable
  6. int numberOfBaskets=10, eggsPerBasket=6, totalEggs;
  7.  
  8. System.out.println("If you have\n");
  9. System.out.println(eggsPerBasket + " eggs per basket and ");
  10. System.out.println(numberOfBaskets + " baskets, then\n");
  11. totalEggs = (numberOfBaskets * eggsPerBasket);
  12. System.out.println("The total number of eggs is " + (totalEggs));
  13. }
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement