63 057
Assignments Done
99,1%
Successfully Done
In July 2018

Answer to Question #13953 in C++ for aceeris

Question #13953
write a C++program for cell phone pin number.
Expert's answer
#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 first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions