#include <iostream>
#include <string.h>
using namespace std;
int main () {
string Phone_No;
while (true) {
cout << "Enter your contact number: " << endl;
cin >> Phone_No;
if (Phone_No[0] == '+' && Phone_No[1] == '5' && Phone_No[2] == '1') {
cout << "The number is belon to Islamobod." << endl;
}
else if (Phone_No[0] == '+' && Phone_No[1] == '4' && Phone_No[2] == '2') {
cout << "The number is belon to Lahore." << endl;
}
else if (Phone_No[0] == '+' && Phone_No[1] == '2' && Phone_No[2] == '1') {
cout << "The number is belon to Karachi." << endl;
}
else {
cout << "Un-known number" << endl;
}
}
return 0;
}
Comments
Leave a comment