such as
998 = 1.0
1275 = 1.3
1598 = 1.6 ish
Anyone know of a list of these anywhere from like 845cc -> to like 6litre or what ever is the largest car on the road...
Thank you for any help in advance

Posted 01 June 2011 - 06:34 PM
Posted 01 June 2011 - 08:45 PM
Posted 01 June 2011 - 08:46 PM
Hey - I'm writing some code for a project, does anyone know if there is a list online of car 'cc's
such as
998 = 1.0
1275 = 1.3
1598 = 1.6 ish
Anyone know of a list of these anywhere from like 845cc -> to like 6litre or what ever is the largest car on the road...
Thank you for any help in advance
Posted 01 June 2011 - 08:48 PM
Posted 01 June 2011 - 09:03 PM
Posted 01 June 2011 - 09:12 PM
What meant was if someone enters say 1.3 in an input box i will save it as that. If someone enters 1275 i will save it as 1.3.
So what i am after is a range of cc's that make up litreages... So if someone enters say 1275-1304 it will convert to 1.3, 1305-1409 becomes 1.4 for instance, i know those figures are wrong, but i hope it explains what i am wanting
Edited by greenlaner1, 01 June 2011 - 09:12 PM.
Posted 01 June 2011 - 09:13 PM
Posted 01 June 2011 - 09:14 PM
What meant was if someone enters say 1.3 in an input box i will save it as that. If someone enters 1275 i will save it as 1.3.
So what i am after is a range of cc's that make up litreages... So if someone enters say 1275-1304 it will convert to 1.3, 1305-1409 becomes 1.4 for instance, i know those figures are wrong, but i hope it explains what i am wanting
I see what you mean now, car companies usually round up or down to the nearest 0.1 litre, so a 6.4 litre engine could be anything from 6350cc to 6449cc (if that makes sense) and thats all there is to it really.
GL1
Posted 01 June 2011 - 09:22 PM
What meant was if someone enters say 1.3 in an input box i will save it as that. If someone enters 1275 i will save it as 1.3.
So what i am after is a range of cc's that make up litreages... So if someone enters say 1275-1304 it will convert to 1.3, 1305-1409 becomes 1.4 for instance, i know those figures are wrong, but i hope it explains what i am wanting
I see what you mean now, car companies usually round up or down to the nearest 0.1 litre, so a 6.4 litre engine could be anything from 6350cc to 6449cc (if that makes sense) and thats all there is to it really.
GL1
1275 is the exception?
Posted 01 June 2011 - 09:36 PM
Posted 01 June 2011 - 09:43 PM
Posted 01 June 2011 - 09:44 PM
Why do you want to build a massive database to do something so simple? All your routine needs to do is divide by 1000 and display / save to 1 significant figure.
Edited by greenlaner1, 01 June 2011 - 10:26 PM.
Posted 02 June 2011 - 08:55 AM
Why do you want to build a massive database to do something so simple? All your routine needs to do is divide by 1000 and display / save to 1 significant figure.
2 significant figures....![]()
GL1
Posted 02 June 2011 - 09:04 AM
Edited by chrisandsarah, 02 June 2011 - 09:15 AM.
Posted 02 June 2011 - 09:33 PM
In a cody format
if( cc < 900 ){
car = "under 1 litre"
}
if( cc > 900 AND cc < 1050){
car = "1 litre"
}
if( cc > 1050 AND cc < 1125){
car = "1.1 litre"
}
if( cc > 1125 AND cc < 1260){
car = "1.2 litre"
}
if( cc > 1260 AND cc < 1320){
car = "1.3 litre"
}
need that up to a 3litre really - but under the 2litre would be the most used i imagine
Something like that would work. It doesnt need to be accurate, just a best guess. As if the person enters 1275, it will be converted to 1.3 in the database. If someone entered say 1.25 like 998dave said, then it would be a 1.2 litre .... would this work?
Does that make sense? Apologies for sudocode it seemed easier
0 members, 1 guests, 0 anonymous users