Created
September 30, 2013 17:05
-
-
Save Mashpy/6766871 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <cstring> | |
using namespace std; | |
int main() | |
{ | |
char *p[4]={"avc","sdf","dfs","eft"}; | |
char ad[5]; | |
cout << "input the book name" << endl; | |
cin>> ad; | |
int i=0; | |
while(i<4){ | |
if((strcmp(ad,p[i]))==0){ | |
cout<<"book is available in item= "<<i; | |
} | |
else | |
cout<<"\nbook is not available in item "<<i; | |
i++; | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment