mardi 3 octobre 2017

Looking for help generating random information for a C++ program

I am working on a program for class that calls for generating 1000 cars with each having the following data.

  • price:positive whole number, between 0-9999.

  • color:enumeration type that includes seven colors{red, blue, white, black, gray green, yellow}

  • VIN: positive whole number, 10 chars should have three A to Z chars. Has to unique for each car.

  • year:between 1950 and 2017

  • Owner: One word string, having only a-z and A-Z. The first letter is capitalized, the rest are lowercase.

I think I have the rest of the program ironed out but this part has left me stumped. I have very little experience with randomizer. Any help I could get would be much appreciated.




Aucun commentaire:

Enregistrer un commentaire