Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Campaign[] c=new Campaign[5];
- for(int i=0;i<c.length;i++)
- if(c[i].adsCost()>c[i].getMaxCost()) System.out.println("the campaign of "+c[i].getOwner()+" has exception.");
- int tv=0, internet=0;
- for(int i=0;i<c.length;i++)
- {
- tv+=c[i].getTvAdsCost();
- internet+=c[i].getInternetAdsCost();
- }
- if(tv>internet) System.out.println("TV ads costs more! (about "+tv+" dollars).");
- else System.out.println("INTERNET ads costs more! (about "+internet+" dollars).");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement