


{"id":206035,"date":"2022-02-21T21:44:35","date_gmt":"2022-02-21T21:44:35","guid":{"rendered":"\/forum\/forums\/reply\/206035\/"},"modified":"2022-02-21T21:44:35","modified_gmt":"2022-02-21T21:44:35","slug":"206035","status":"publish","type":"reply","link":"https:\/\/innovationspace.ansys.com\/forum\/forums\/reply\/206035\/","title":{"rendered":"Reply To: About the selection of odd and even numbers through *IF and *DO loop"},"content":{"rendered":"<p>There are probably multiple approaches that will work.  One approach might be to use the MOD(x,y) function. to find the remainder.  Something like:<br \/>\nx1 = mod(ii,2)   ! place immediately after *DO command<br \/>\nIf ii is an even number;  then x1 would be equal to zero<br \/>\nIf ii  is an odd number, then x1 would be equal to 1<br \/>\nYou can then use x1 in the *IF statements<\/p>\n","protected":false},"template":"","class_list":["post-206035","reply","type-reply","status-publish","hentry"],"aioseo_notices":[],"acf":[],"_links":{"self":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/replies\/206035","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/replies"}],"about":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/types\/reply"}],"version-history":[{"count":0,"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/replies\/206035\/revisions"}],"wp:attachment":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/media?parent=206035"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}