  We study star formation history and stellar metallicity distribution in
galaxies in a Lambda cold dark matter universe using a hydrodynamic
cosmological simulation. Our model predicts star formation rate declining in
time exponentially from an early epoch to the present with the time-scale of 6
Gyr, which is consistent with the empirical Madau plot with modest dust
obscuration. Star formation in L^* galaxies continues intermittently to the
present also with an exponentially declining rate of a similar time-scale,
whereas in small galaxies star formation ceases at an early epoch. The mean age
of the extant stars decreases only slowly with increasing redshift, and exceeds
1 Gyr at z=3. Normal galaxies contain stars with a wide range of metallicity
and age: stars formed at z<1 have metallicity of 0.1-1.0 Zsun, while old stars
take a wide range of values from 10^{-6} Zsun to 3.0 Zsun. The mean metallicity
of normal galaxies is in the range 0.1-1.0 Zsun. Dwarf galaxies that contain
only old stars have a wide range of mean metallicity (10^{-4}-1.0 Zsun), but on
average they are metal deficient compared with normal galaxies.
