Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main()
- {
- int i, j, found=1;
- char *strings[] = {
- "je suis une phrase.",
- "moi aussi.",
- "lolo la street",
- "j'aime la confiture de fraises",
- "l'info c'est cool",
- "trump president des usa",
- "macron president francais",
- "votre code confidentiel",
- "pour les jeunes",
- "course a pied"
- };
- char temp[60];
- printf("Entrez une phrase : \n");
- gets(temp);
- for (i=0;i<10;i++){
- j=0;
- while (temp[j]!='\0'){
- if (strings[i][j]!=temp[j])
- found=0;
- j++;
- }
- if (found)
- printf("phrase trouvee ligne %d",i+1);
- found=1;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement