" />
Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - c language.

Declare an integer array consisting of 10 elements, randomly generate an integer within 100 for assignment, and display it.

c language.

Declare an integer array consisting of 10 elements, randomly generate an integer within 100 for assignment, and display it.

#include?"stdio.h"

int?main()

{

int?a[10],i ;

srand((unsigned)time(NULL));

for(i=0;i<10;i++) a[i]=rand()%100;< /p>

for(i=0;i<10;i++)?

printf("%d,",a[i]);

}

p>