Problem with a Vehicle Catalogue
I am trying to solve a problem where i need to create something like a vehicle catalogue it works for the most part but im still not getting the right answers on some inputs this is my code: https://pastebin.com/n82eac2U
Pastebin
using System;using System.Collections.Generic;using System.Linq;usi...
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
14 Replies
On which inputs?
And how are the results wrong?
thats the thing i don't know the inputs
it just tells me im wrong
Does it work for the example input?
yes
One of the requirements is to print
$"{typeOfVehicle} have average horsepower of: {horsePower}."
You have hardcoded Trucks
and Cars
What if the user creates a new vehicle of type Scooter
?its said in the constraints that it will either be a car or a truck
I wonder if it maybe expects you to print the average HP even if there are no vehicles of that type
The exercise says print one and the other
So it might just expect the evrage of trucks to be
0.00
when there are no trucks
It's mostly just guesswork, though, without knowing what the tests are ¯\_(ツ)_/¯i will try without them
yeah pretty annoying i thought someone could maybe spot a rookie mistake here
nope still not working
You can try it with this code
Log in - SoftUni Judge
Online system for programming competitions
link to the problem