Question
given a string as input containing the ticket information of passengers, writ a prog to print the ticket ID of all the passenger's input: ticket
given a string as input containing the ticket information of passengers, writ a prog to print the ticket ID of all the passenger's
input: ticket information of all passengers are given in a single string comma-separated input format source:destination: mobile numb
output format: print comma-separated ticket IDs of all the passengers.follow the format: first two characters of a source followed by last two characters of destination followed by the sum of the digits present in even indices including 0 of the mobile# followed by sequence# of the passenger in the input string starting with 1
exp: input
Paris:Delhi:9945672345,Berlin:Brussels:9456723456
expected output Pahi251,Bels292
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started