On Mon, Jul 27, 2020 at 11:53:11AM +0800, Fawad Hayat wrote: > Hello everbody, > > I’m writing a program in GAP for group elements, that any two elements of a > group G are an integral power of one another, i.e., for any x, y ∈ G, then x > n=y or yn=x, where n is any positive integer. But it has some problems. *I > don’t know where to write the value “n.”* I’ll be very grateful if it can > be written more simply.
It seems your question is how to loop over the integers. You can do something like gap> for n in [1..10] do Print(n); od; 12345678910 Cheers, Bill. _______________________________________________ Forum mailing list Forum@gap-system.org https://mail.gap-system.org/mailman/listinfo/forum