Advertisement
Guest User

yo

a guest
Nov 24th, 2014
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. Campaign[] c=new Campaign[5];
  2. for(int i=0;i<c.length;i++)
  3. if(c[i].adsCost()>c[i].getMaxCost()) System.out.println("the campaign of "+c[i].getOwner()+" has exception.");
  4.  
  5. int tv=0, internet=0;
  6. for(int i=0;i<c.length;i++)
  7. {
  8. tv+=c[i].getTvAdsCost();
  9. internet+=c[i].getInternetAdsCost();
  10. }
  11. if(tv>internet) System.out.println("TV ads costs more! (about "+tv+" dollars).");
  12. else System.out.println("INTERNET ads costs more! (about "+internet+" dollars).");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement