13. Consider a freight company. This company may deliver packages around the world. Each package has a tracking code whi
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
13. Consider a freight company. This company may deliver packages around the world. Each package has a tracking code whi
13. Consider a freight company. This company may deliver packages around the world. Each package has a tracking code which consists of a string in the following format: destination, country code, a suburb location code which is an integer number, the character 'C', an integer number represent- ing the customer id code, the character 'W', followed by an integer which contains the weight of the package. An example of a tracking code in this format is AU2010C42W74. Write a program which reads a tracking code in from the console and uses regex to determine if the tracking code is valid.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!