Untitled
public text v1 · immutable#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main ()
{
char nom[30];
int age, taille;
printf("Entrez le nom du capitaine : ");
gets(nom);
printf("Entrez maintenant son age : ");
scanf_s("%d",&age);
taille = strlen(nom);
if (strcmp(nom,"Haddock") == 0)
printf("\nMoule a gauffre !");
else
printf("\nLe capitaine s'apelle %s et a %d ans. En plus, il y a %d lettres dans son nom.",nom,age,taille);
printf("\n\n");
system("PAUSE");
return 0;
}