Answer to Question #259910 in C for fas

Question #259910

As a safety precaution banks provide a feature that during any ATM transaction if someone comes and attacks, then the customer can enter the ATM pin in reverse order. This sends a message to the nearest police station. However if the reversed pin is the same as he original pin then no alarm is created. The bank needs a software application that checks that a user chooses an ATM pin whose reverse is not the same number. A software need to be developed with following requirements using while loop.

a. Read the pin number

b. Calculate the reverse the pin number

c. if the reversed pin is same as original pin then inform the user that this is an invalid pin number


1
Expert's answer
2021-11-04T03:50:00-0400




#include <iostream>


using namespace std;






int main() {


  const int NUM_GUESSES = 3;


  int userGuesses[NUM_GUESSES];


  int i;






  for(int j=0; j<NUM_GUESSES; j++){
  	cin>>userGuesses[j];
  }






  for (i = 0; i < NUM_GUESSES; ++i) {


   cout << userGuesses[i] << " ";


  }






  return 0;


}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS