How can integer array use stream function

In reply to yourcheers:
Hi. I think I may declare the question more in details. Since there are more restrictions. For example, the upper three digits cannot be consecutive. That’s why I think I need to choose array.

In reply to aaaaaa:

module abc;
initial begin
//option-1 : if you want to check the 10-digit integer value is multiple of 9
int array = 0123456789;
$display(array % 9);
//option-2 : if you want to check multiple of 9, reducing one digit every time
array = 0123456789;
while(array != 0)begin
$display(array, array % 9 );
array = array/10;
end
//option-3 : if you want to check the multiple of 9, for each of the digit in 10-digit value
array = 0123456789;
while(array != 0)begin
$display(array, (array%10) % 9);
array = array/10;
end
end
endmodule

may be you are looking for one of the these three options?