#include
#include
#include
int main(void)
{
int i;
int number;
int turn;
while(1)
{
printf("Enter the number of the turns\n");
scanf("%d",&turn);
printf("Enter a number\n");
scanf("%d",&number);
srand(number);
for(i=1;i<=turn;i++)
{
printf("%10d", ( rand() % 100));
if(i % 2 == 0)
{
printf("\n");}
}
}
return 0;
getch();
}
Output:
Enter the number of the turns
20
Enter a number
90
32 4
81 47
62 55
42 75
33 74
10 65
61 90
84 85
0 87
21 80
Enter the number of the turns
2
Enter a number
90
32 4
Enter the number of the turns
20
Enter a number
80
99 24
80 58
21 23
85 79
57 87
89 24
80 67
38 12
64 43
82 77
Enter the number of the turns
#include
#include
int main(void)
{
int i;
int number;
int turn;
while(1)
{
printf("Enter the number of the turns\n");
scanf("%d",&turn);
printf("Enter a number\n");
scanf("%d",&number);
srand(number);
for(i=1;i<=turn;i++)
{
printf("%10d", ( rand() % 100));
if(i % 2 == 0)
{
printf("\n");}
}
}
return 0;
getch();
}
Output:
Enter the number of the turns
20
Enter a number
90
32 4
81 47
62 55
42 75
33 74
10 65
61 90
84 85
0 87
21 80
Enter the number of the turns
2
Enter a number
90
32 4
Enter the number of the turns
20
Enter a number
80
99 24
80 58
21 23
85 79
57 87
89 24
80 67
38 12
64 43
82 77
Enter the number of the turns