1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
#include <iostream>
#include <string.h>
using namespace std;
int main()
{
int i, ctr=0;
string n;
int string name["Andre","Auset","Caroline","Chris B.","Chris S.","Corbin","Janay","Jason","Jawwaad","Kathleen","Kristyll","Malik","Quinn","Ravenn","Travis","Tyler"];
cout<<"Please input name: ";
cin>>n;
for(i=0; i<15; i=i+1)
{
if (name[i]==n)
ctr++;
}
if (ctr==0)
cout<<n<<" is not on the list";
else
cout<<n<<" is on the list";
|