Difference between revisions of "Accumulators For Searching Tutorial"

From Progzoo
Jump to: navigation, search
(Average Name Length)
(Average Name Length)
Line 33: Line 33:
 
       acc += name.length();
 
       acc += name.length();
 
     }
 
     }
     System.out.println(acc*1.0/count);
+
     System.out.printf("%1.2f",acc*1.0/count);
 
   }
 
   }
 
}
 
}

Revision as of 12:55, 13 November 2008

Average Name Length

What is the average length of Country name.

[Font] [Default] [Show] [Resize] [History] [Profile]

Which country has the biggest population?

What is the name of the largest country (by population).

[Font] [Default] [Show] [Resize] [History] [Profile]

Which middle eastern country has the smallest population?

What is the name of the country in region "Middle East" with the smallest population.

[Font] [Default] [Show] [Resize] [History] [Profile]