Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package chickens01;
- public class Chickens01 {
- public static void main(String[] args) {
- //Put yout code here
- int eggsPerChicken = 5;
- int chickenCount = 3;
- int a = eggsPerChicken * chickenCount;
- int b = chickenCount + 1;
- int c = eggsPerChicken * chickenCount;
- int d = a + c;
- int e = chickenCount / 2;
- int f = eggsPerChicken * chickenCount;
- int g = d + f;
- int totalEggs = g;
- int eggsPerChicken2 = 4;
- int chickenCount2 = 8;
- int a2 = eggsPerChicken2 * chickenCount2;
- int b2 = chickenCount2 + 1;
- int c2 = eggsPerChicken2 * chickenCount2;
- int d2 = a2 + c2;
- int e2 = chickenCount2 / 2;
- int f2 = eggsPerChicken2 * chickenCount2;
- int g2 = d2 + f2;
- int totalEggs2 = g2;
- System.out.println(totalEggs + " and " + totalEggs2);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement