subject

A delivery company has hired you to manage their tracking services division. It is your job to store all of the currently used tracking codes in the company's database. These codes consist of either all integers, all decimal numbers, or all characters. The chief technology officer has warned you that the database is old and has limited space, so you want to determine how much memory the tracking codes will occupy before storing them. You decide to write a program to assist you in this process. Your program should first read an integer number indicating how many tracking codes you plan on entering. Next, for each successive tracking code your program should read in the integer length of code followed by a space and then the type of code ('i' for integer, 'd' for decimal, or 'c' for character). Finally your program should print the total amount of space required to store all of the tracking codes (in bytes). If the user enters an incorrect type for any tracking number, the program should print 'Invalid tracking code type' and exit. Examples Input: 3 10 i 7 c 12 d Output: 143 bytes Input: 2 3 c 20 d Output: 163 bytes Input: 4 5 i 2 d 10 a 3 c Output: Invalid tracking code type

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 21:00
The mode is generally used when delivering a presentation to an need now
Answers: 1
question
Computers and Technology, 23.06.2019 10:00
How do i delete my account on this because i didn't read this agreements and also i put age at xd
Answers: 1
question
Computers and Technology, 23.06.2019 11:00
Sports and entertainment class, your goal is to increase attendance and make a profit for a game by getting your team on a winning track with total salaries less than $3,000,000
Answers: 3
question
Computers and Technology, 24.06.2019 03:30
What is the purpose of a computer network needs assessment? to analyze which workers need more training to improve their performance to compare worker productivity to determine what steps employees can take to increase company revenue to evaluate how to move from the current status to the desired goal
Answers: 2
You know the right answer?
A delivery company has hired you to manage their tracking services division. It is your job to store...
Questions
question
Geography, 11.10.2020 14:01
question
Mathematics, 11.10.2020 14:01
question
Mathematics, 11.10.2020 14:01
question
Computers and Technology, 11.10.2020 14:01
question
Mathematics, 11.10.2020 14:01
question
Mathematics, 11.10.2020 14:01
Questions on the website: 13722360