Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <conio-bis.h>
- int main ()
- {
- char mot[10][20],voyelle[]="AaEeIiOouUyY";
- int i,j,k,l,nbrevoyelles[10];
- for(i=0;i<10;i++)
- {
- printf("\nEntrez le mot %d ",i+1);
- scanf("%s",mot[i]);
- }
- for(i=0;i<10;i++)
- {
- l=0;
- j=0;
- while(mot[i][j]!='\0')
- {
- k=0;
- while(voyelle[k]!='\0')
- {
- if(mot[i][j]==voyelle[k])
- l++;
- k++;
- }
- j++;
- }
- nbrevoyelles[i]=l;
- }
- for(i=0;i<10;i++)
- {
- if(nbrevoyelles[i]<=1)
- {
- printf("\n%s : %d voyelle",mot[i],nbrevoyelles[i]);
- }
- else
- {
- printf("\n%s : %d voyelles",mot[i],nbrevoyelles[i]);
- }
- }
- getch ();
- return 0;
- }
Add Comment
Please, Sign In to add comment