156k views
2 votes
Define the missing function. licenseNum is created as: (100000 * customID) licenseYear, where customID is a function parameter. Sample output with inputs 2014 777: Dog license: 77702014

User Vu Le Anh
by
4.2k points

2 Answers

4 votes

Answer: C++

void DogLicense:: CreateLicenseNum(int customID) {

licenseNum = (100000* customID) + licenseYear;

return;

}

User Mikeon
by
4.6k points
3 votes

Answer:

Written in Python:

def licenseNum(licenseYear, customID):

output = 100000 * customID + licenseYear

print("Dog license: "+str(output))

Step-by-step explanation:

This line defines the function with parameters licenseYear and customID

def licenseNum(licenseYear, customID):

This calculates the output as stated in the question

output = 100000 * customID + licenseYear

This displays the output

print("Dog license: "+str(output))

To call the function, make use of: licenseNum(2014, 777)

Where 2014 and 777 can be replaced with other digits as required

User BernhardWebstudio
by
4.4k points