All pastes #425826 Raw Edit

Stuff

public text v1 · immutable
·published 2007-04-05 19:05 UTC
rendered paste body
#include <stdio.h>
#include <stdlib.h>

struct Personne
{
  char nom[100];
  char prenom[100];
  char adresse[1000];
  long age;
  int garcon; // Booléen : 1 = garçon, 0 = fille                                                         
};

int main(int argc, char *argv[])
{
  struct Personne joueur[2];
  int i;

  for(i=0; i<=1; i++)
    {
      printf("Veuillez entrez votre nom, prenom, adresse, age et sexe(1. garcon, 0. fille)\n");
      scanf("%s", joueur[i].nom);
      scanf("%s", joueur[i].prenom);
      scanf("%s", joueur[i].adresse);
      scanf("%ld", &joueur[i].age);
      scanf("%d", &joueur[i].garcon);
    }

  i=0;
  while(i<=1)
    {
      printf("\n\nLes donnees du joueur %d sont donc:\nnom:%s\nprenom:%s\nadresse:%s\nage:\%ld\nsexe:%ld\
 (1. garçon, 0. fille)", i+1, joueur[i].nom, joueur[i].prenom, joueur[i].adresse, joueur[i].age, joueur[\
i].garcon);
      i++;
    }
}