/* 计算1到1000之间的随机数 */
main()
{ int a, b, c; v:printf("请输入随机数数目"); scanf("%d", &b); srand((int)time(0)); for (a = 0; a < b; a++) { c = (int)(rand() % 1000); printf(" %d ", c); } a = b = c = 0; goto v;
}
/* 计算1到1000之间的随机数 */
main()
{ int a, b, c; v:printf("请输入随机数数目"); scanf("%d", &b); srand((int)time(0)); for (a = 0; a < b; a++) { c = (int)(rand() % 1000); printf(" %d ", c); } a = b = c = 0; goto v;
}