Advertisement
Guest User

alexis le bg

a guest
Oct 19th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.63 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <string.h>
  4. #define TAILLE 5
  5.  
  6.  
  7. void main (void)
  8. {
  9.     char lettre[TAILLE] ;
  10.     unsigned int count, i, majd ;
  11.    
  12.     printf("entrer la chaine de caracteres : ");
  13.     if( gets(lettre) == NULL )
  14.     {
  15.         puts("uiDQGJHOUDS");
  16.     }
  17.     else
  18.     {
  19.  
  20.  
  21.    
  22.  
  23.         count = ( strlen(lettre) + 1 ) ;
  24.  
  25.    
  26.         for ( i = 0 ; i < count ; i++ )
  27.         {
  28.  
  29.             printf("%s", lettre[i] );
  30.  
  31.             if ( lettre[i] > 64 || lettre[i] < 64 )
  32.             {
  33.  
  34.             }
  35.  
  36.  
  37.         }
  38.  
  39.    
  40.         printf("il y as %d caracteres dans cette chaine \n", count );
  41.         printf("il y as %d caracteres dans cette chaine \n", count );
  42.  
  43.    
  44.     }
  45.  
  46.  
  47.  
  48.  
  49.     system("pause");
  50.  
  51.  
  52. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement