Guest User

Untitled

a guest
Jun 22nd, 2018
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.82 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <conio-bis.h>
  3. int main ()
  4. {
  5.     char mot[10][20],voyelle[]="AaEeIiOouUyY";
  6.     int i,j,k,l,nbrevoyelles[10];
  7.     for(i=0;i<10;i++)
  8.     {
  9.        printf("\nEntrez le mot %d ",i+1);
  10.        scanf("%s",mot[i]);
  11.     }
  12.     for(i=0;i<10;i++)
  13.     {
  14.        l=0;
  15.        j=0;
  16.        while(mot[i][j]!='\0')
  17.        {  
  18.           k=0;
  19.           while(voyelle[k]!='\0')
  20.           {
  21.             if(mot[i][j]==voyelle[k])
  22.                l++;
  23.             k++;
  24.           }
  25.           j++;
  26.        }
  27.        nbrevoyelles[i]=l;
  28.     }
  29.     for(i=0;i<10;i++)
  30.     {
  31.        if(nbrevoyelles[i]<=1)
  32.        {
  33.          printf("\n%s : %d voyelle",mot[i],nbrevoyelles[i]);
  34.        }
  35.        else
  36.        {
  37.          printf("\n%s : %d voyelles",mot[i],nbrevoyelles[i]);
  38.        }
  39.     }
  40. getch ();
  41. return 0;
  42. }
Add Comment
Please, Sign In to add comment