Skip to content

Instantly share code, notes, and snippets.

@flpsaad
Created December 19, 2018 20:15
Show Gist options
  • Save flpsaad/2426c87254b7eedc8aa8f08ff86a6856 to your computer and use it in GitHub Desktop.
Save flpsaad/2426c87254b7eedc8aa8f08ff86a6856 to your computer and use it in GitHub Desktop.
titre.prénom.soyez bienvenu
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
int main()
{
char prenom[20];
char titre[10];
printf("entrez votre prenom: ");
scanf("%s",&prenom);
printf("entrez votre titre: ");
scanf("%s",&titre);
if(strcmp(titre,"Mr"))
{
printf("%s %s, soyez le bienvenu ", titre,prenom);
}else{
printf("%s %s, soyez la bienvenue", titre,prenom);
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment