59
int stargraph(Graph *G, char *mess){
int i, n;

    /* Le o numero de vertices do grafo */
    n = pgin_read_int("Generate Star Graph", "Number of vertices",
                5, 1, 2000000, 1);

    /* Inicializar o grafo da area de trabalho */
    InitGraph(G, G->type);

    /* Adiciona N vertices na posicao (0,0) */
    for (i = 0; i < n; i++)
        AddPoint(G, 0, 0);

    /* Adiciona N arestas comecando no vertice 0 ate N-1 */
    for (i = 1; i < n; i++) { 
        AddEdge(G, 0, i);
    }

    return 1;
}
