3:53 pm - Thursday March 25, 8821

Java Example Program for reminder without modulation (%) operator

CANDID INDUSTRIAL TRAINING -- CHENNAI
Corporate Training for Experienced Candidate
Struts | Hibernate | Spring | Java / J2EE
SOAP | RestFull | Design Pattern | more...
Ph: +91 72000 69003
137b, 2nd st, shanthi nagar, Chrompet, Chennai -600044

/**
*@auther      : Candidjava.com
*@Description : To findout reminder without modulation operator
*/
public class Modulation
{
public void Mod()
{
int dv=27,dr=12,i;
System.out.println("Dividend = " + dv);
System.out.println("Divisor = " + dr);
for(i=0;dv>dr;i++)
{
dv=dv-dr;
}
System.out.println("Reminder = " + dv);
}
public static void main(String[] args)
{
Modulation d=new Modulation ();
d.Mod ();
}
}

Output:

Dividend : 27
Divisor : 12
Reminder : 3

Filed in: Z-A All Java Codes

Comments are closed.