Ok..ive added the suggest line of code..The q to quit now works..however if I enter a name..nothing happens. I think it could be something with the position of the inserted line of code..hummmm
Code:
#include <iostream>
#include <cstdio>
using namespace std;
int main () {
int i;
char name[80];
char numbers[10] [80] = {
"Alex", "4783748738378",
"Anita", "334455235342",
"Martin", "015223354666"
};
cout << "\nPLEASE ENTER THE NAME (q To Quit): ";
cin >> name;
for(i=0; i <= 10; i =+ 2)
if( (strcmp(name,"q")==0) || (strcmp(name,"Q")==0) )return 0;
if(!strcmp(name, numbers[i])) {
cout << "The Number Is: " << numbers[i+1] << "\n";
}
return 0;
}