Answer to Question #13953 in C++ for aceeris

Question #13953
write a C++program for cell phone pin number.
1
Expert's answer
2012-08-30T11:32:50-0400
#include <iostream.h>

int i=0;
int PIN=1111, PI, PUK=123123123, PU;
bool req=false;

void main(){
while ((req == false)&&(i<3)){
cout<<"Enter PIN: ";
cin>>PI;
if (PIN == PI) {
cout<<"welcome to smart....Simply Amazing
"; req=true; }
else cout<<"Invalid PIN code
";
i++;
}
i=0;
while ((req == false)&&(i<3)){
cout<<"Enter PUK: ";
cin>>PU;
if (PU == PUK) { cout<<"welcome to smart....Simply Amazing
"; req=true; }
else cout<<"Invalid PUK code
";
i++;
}
if (req==false) cout<<"SIM BLOCKED
";
}

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
APPROVED BY CLIENTS