Write a program that asks the user for the pin

Assignment Help Computer Engineering
Reference no: EM131830940

Problem

When you use an automated teller machine (ATM) with your bank card, you need to use a personal identification number (PIN) to access your account. If a user fails more than three times when entering the PIN, the machine will block the card. Assume that the user's PIN is "1234" and write a program that asks the user for the PIN no more than three times,and does the following:

• If the user enters the right number, print a message saying, "Your PIN is correct", and end the program.

• If the user enters a wrong number, print a message saying, "Your PIN is incorrect" and, if you have asked for the PIN less than three times, ask for it again.

• If the user enters a wrong number three times, print a message saying "Your bank card is blocked" and end the program.

Reference no: EM131830940

Questions Cloud

How much will be in the pool after it doubles : If 10 people are playing the game, and they all chip in their $5 to the pool, how much will be in the pool after it doubles?
What advice might you give about planning the experiment : (a) What questions would you ask her? (b) What advice might you give about planning the ·experiment?
Write a program that calculates a tip : Write a program that calculates a tip according to the diner's satisfaction as Ask for the diners' satisfaction level using these ratings.
Estimate the mean difference produced by the diets : Given the following data on egg production from 12 hens randomly allocated to two different diets, estimate the mean difference produced by the diets and obtain
Write a program that asks the user for the pin : When you use an automated teller machine (ATM) with your bank card. Write a program that asks the user for the PIN no more than three times.
What can you conclude about the relative scarcity of land : Hunting animals specifically for fur was not yet widely practiced. What can you conclude about the relative scarcity of land or animals? Why?
Confidence interval for the difference in mean height : Obtain a 95% confidence interVal for the difference in mean height.
Superscripts in parentheses denote the time order : The superscripts in parentheses denote the time order in which the runs were made. Comment on the data and analyze them.
What type of good was the pilgrims harvest : Why would the communal system reduce something that would have been to the pilgrim's benefit?

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd