adminv15
Ominide
1 min. di lettura
Vota

Download sorgente

 /*  * Il seguente programma stampa h numeri n-poligonali  * (Cfr. http://mathworld.wolfram.com/PolygonalNumber.html )  */ #include  unsigned int polynum(unsigned int, unsigned int); int main(void) { 	unsigned int side = 2, numbers, i; 	/* read polygonal side, how much numbers to print */ 	while (side  2): "); 		scanf("%u", &side); 		if (side 
"); 	} 	printf("How much numbers? "); 	scanf("%u", &numbers); 	for (i = 1; i  0) 		printf("...
"); return 0; } unsigned int polynum(unsigned int n, unsigned int h) { if (n

Domande e risposte

Hai bisogno di aiuto?
Chiedi alla community