Advertisement
ereinion

SalesAnalyzer

Sep 17th, 2018
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. void write_big_sales(int limit) {
  2.     string[int] shopLog = get_shop_log();
  3.     matcher meat_gain;
  4.     string pattern = "for (\\d+) Meat";
  5.     int meat;
  6.    
  7.     foreach i in shopLog {
  8.         meat_gain = create_matcher(pattern, shopLog[i]);
  9.         if (find(meat_gain)) {
  10.             meat = to_int(group(meat_gain, 1));
  11.             if (meat >= limit) {
  12.                 print_html("<font color=0000FF>" +  i + " - " + shopLog[i] + "</font>");
  13.             }
  14.         }
  15.     }
  16. }
  17.  
  18. void main() {
  19.     write_big_sales(500000);
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement