I have this program that takes user input and searches a data file for cars that meet the users preferences, now if their are cars that match. The output, "Cars that match your requirements with at least 80% fit:, needs to display how many cars that would be and I can't seem to figure out how I could go about doing this. below I have what I have come up with I have added another if statement and another var called totalcars. is their a way to take the cars that work for the boolean statement and register them into a number? thanks Eric
(Marilyn added code tags) [ September 27, 2003: Message edited by: Marilyn de Queiroz ]
yeah I think that would work, but the counter has to been in the statment "Cars that match your requirements with at least 80% fit", so it should say something like Example, "2 Cars that match your requirements with at least 80% fit:" and the problem I'm having is that statement can only be displayed once per starting run of the loop and since the guts of the calculations are in a for loop how can I get a total number of cars that are going to get printed when the loop running on car at a time. I can't seem to think of anything
This should do what you want (this is aircode - so expect typos, missing semi-colons etc). You might also have to convert some of the carData info to String.
[ September 28, 2003: Message edited by: Michael Dunn ]
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.