You are on page 1of 1

#include <stdio.

h>
#include <conio.h>
#include <stdlib.h>
void main()
{ int a[10],b[10],i,j=0;
randomize();
printf("TU ARREGLO 1 ES: \n\n");
for(i=0; i<10; ++i)
{
do
{ a[i]=20+random(60);
}while (a[i]%2!=0);
printf("%d\t",a[i]);
}
for(i=0; i<10; ++i)
{
if (a[i]%3==0)
{
b[j]=a[i];
j++;
}
}
printf("TUS NUMEROS MULTIPLOS DE 3 SON: \n\n");
for(i=0; i<j; ++i)
{printf("%d\t",b[i]);
}
getch();
}

You might also like