subject
Engineering, 16.04.2021 08:50 Braxtonw875

Write a program that asks the user to enter an account number as a string. The account number consists of 8 characters and is divided as follows:
 The first 2 characters are digits and represent the branch (00 for Beirut, 01 for Saida, 02 for Tripoli).
 The remaining 6 characters represent the customer’s account number
A valid account number consists of exactly 8 characters. If the account is valid, the program prints the details
(branch and account number). If the account is not valid, the program displays a message to the user.
Sample Run 1:
Enter a string: 100201
Not valid
//It is not valid because the string is not composed of 8 characters
Sample Run 2:
Enter a string: AB100201
Not valid
//It is not valid because the branch is wrong
Sample Run 3:
Enter a string: 00100201
Branch: Beirut
Customer number: 100201
Sample Run 4:
Enter a string: 0210AB01
Branch: Tripoli
Customer number: 10AB01

ansver
Answers: 2

Another question on Engineering

question
Engineering, 03.07.2019 19:30
When using the ohmmeter function of a digital multimeter, the leads are placed in what position relative to the component being tested? a. parallel b. control c. series d. line
Answers: 3
question
Engineering, 04.07.2019 18:10
Afour cylinder four-stroke in-line engine has a stroke of 160mm, connecting rod length of 150mm, a reciprocating mass of 3kg and its firing order is 1-3-4-2. the spacing between cylinders is 100mm. i. show that the engine is in balance with regard to the primary inertia forces and primary 3. a and secondary inertia couples. li determine the out of balance secondary inertia force ii. propose ways of balancing this out of balance force and discuss the challenges that will arise
Answers: 3
question
Engineering, 04.07.2019 18:10
At 12 noon, the count in a bacteria culture was 400; at 4: 00 pm the count was 1200 let p(t) denote the bacteria cou population growth law. find: (a) an expression for the bacteria count at any time t (b) the bacteria count at 10 am. (c) the time required for the bacteria count to reach 1800.
Answers: 1
question
Engineering, 04.07.2019 18:10
Burgers vector is generally parallel to the dislocation line. a)-true b)-false
Answers: 2
You know the right answer?
Write a program that asks the user to enter an account number as a string. The account number consis...
Questions
question
Social Studies, 09.12.2021 23:10
question
Chemistry, 09.12.2021 23:10
question
Mathematics, 09.12.2021 23:10
question
Mathematics, 09.12.2021 23:10
Questions on the website: 13722360