mirror of
https://codeberg.org/DansLeRuSH/c-plus-plus-exercises.git
synced 2024-11-21 19:18:08 +00:00
21 lines
350 B
C++
21 lines
350 B
C++
|
//Auteur : Franck ALBARET
|
||
|
#include <stdio.h>
|
||
|
#include <conio.h>
|
||
|
|
||
|
int main (void)
|
||
|
{
|
||
|
int i=0;
|
||
|
int cpt=0;
|
||
|
char Texte [60];
|
||
|
puts ("Veuillez taper votre texte :\n");
|
||
|
gets(Texte);
|
||
|
while(Texte[i]!='\0')
|
||
|
{
|
||
|
if (Texte[i]=='a')
|
||
|
cpt=cpt+1;
|
||
|
i=i+1;
|
||
|
}
|
||
|
printf ("\n\n Le nombre de A est %i\n",cpt);
|
||
|
return 0;
|
||
|
}
|