codice:
#include <stdio.h>
#include <string.h>
#include <stdlib.h>

typedef struct info_s {
  char nome[15];
  unsigned int popolazione;
  double redditom;
} info_t;

int main() {
  char buffer[100];
  info_t prova;
  fgets(buffer, 15, stdin);
  strcpy(prova.nome, buffer);
  prova.nome[strlen(prova.nome)-1] = NULL;
  fgets(buffer, 100, stdin);
  prova.popolazione = atoi(buffer);
  fgets(buffer, 100, stdin);
  prova.redditom = atof(buffer);
  printf("Nome: %s\nPopolazione: %u\nReddito Medio: %0.2f\n", prova.nome, prova.popolazione, prova.redditom);
  return 0;
}
Prova a capire e riadattare questo codice...