function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
HydHyd 

Reg: Mod() Function

hi,

 

In apex class (in method) i wrote a statement like,

 

a=mod(n,10);

 

but it returned error.

 

I would like to perform the mod() operation.

How can i do it...

 

please help me.

 

Best Answer chosen by Admin (Salesforce Developers) 
kritinkritin
Integer remainder = math.mod(12, 2); system.assertEquals(remainder, 0);