Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //author name : afiqah amir
- public class Exercise6 {
- public static void main (String[]largs)
- {
- //declare variable
- int numberOfBaskets=10, eggsPerBasket=6, totalEggs;
- System.out.println("If you have\n");
- System.out.println(eggsPerBasket + " eggs per basket and ");
- System.out.println(numberOfBaskets + " baskets, then\n");
- totalEggs = (numberOfBaskets * eggsPerBasket);
- System.out.println("The total number of eggs is " + (totalEggs));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement