resents a passcode. The program indicates whether the number is a valid passcode. A passcode is -- it has 8 digits -- the number-A (first 4 digits) is exactly 2.5 times the number-B (last 4 digits) example: 30301212 is valid because 3030 is equal to 2.5 times 1212.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
Design, implement and test a C# console app that prompts the user to enter an 8-digit number that
represents a passcode. The program indicates whether the number is a valid passcode. A passcode is valid if:
-- it has 8 digits
-- the number-A (first 4 digits) is exactly 2.5 times the number-B (last 4 digits)
For example: 30301212 is valid because 3030 is equal to 2.5 times 1212.
Transcribed Image Text:Design, implement and test a C# console app that prompts the user to enter an 8-digit number that represents a passcode. The program indicates whether the number is a valid passcode. A passcode is valid if: -- it has 8 digits -- the number-A (first 4 digits) is exactly 2.5 times the number-B (last 4 digits) For example: 30301212 is valid because 3030 is equal to 2.5 times 1212.
Test
Entrada Resultado
First
75253010 Enter a simple pass code (8 digits):
Part A: 7525, Part B: 3010
valid Passcode
Second
30301212 Enter a simple pass code (8 digits):
Part A: 3030, Part B: 1212
valid Passcode
Third
30851234 Enter a simple pass code (8 digits):
Part A: 3085, Part B: 1234
valid Passcode
Fourth
12345678 Enter a simple pass code (8 digits):
Part A: 1234, Part B: 5678
Invalid Passcode
Fifth
123456
Enter a simple pass code (8 digits):
Simple pass code is invalid, it must have 8 digits
Transcribed Image Text:Test Entrada Resultado First 75253010 Enter a simple pass code (8 digits): Part A: 7525, Part B: 3010 valid Passcode Second 30301212 Enter a simple pass code (8 digits): Part A: 3030, Part B: 1212 valid Passcode Third 30851234 Enter a simple pass code (8 digits): Part A: 3085, Part B: 1234 valid Passcode Fourth 12345678 Enter a simple pass code (8 digits): Part A: 1234, Part B: 5678 Invalid Passcode Fifth 123456 Enter a simple pass code (8 digits): Simple pass code is invalid, it must have 8 digits
Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY