Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


How to find remainder of two numbers without using (%)
operator



How to find remainder of two numbers without using (%) operator..

Answer / shubham

using formula "Dividend = Quotient x Divisor + Remainder"
the c++ code for this would be

#include<iostream.h>
void main()
{
int a,b,q,r;
cout<<"Enter a ";
cin>>a;
cout<<"Enter b ";
cin>>b;
q=a/b;
r=a-q*b;
cout<<"Remender="<<r;
}

Is This Answer Correct ?    16 Yes 1 No

Post New Answer

More General Aptitude Interview Questions

what is ment SEBI?

3 Answers  


I am applying for vizag steel plant management recruitment for 2009 please can anybody send me the pattern of the written test paper

31 Answers   Salem Steel Plant, Steel Plant, TATA, Vizag Steel, VSP,


A certain street has 500 buildings. A sign-maker is contracted to number the houses from 1 to 500. How many zeroes will he need?

0 Answers  


There N stations on a railroad. After adding x stations 46 additional tickets have to be printed. Find N and X.

0 Answers   IBM,


please send general aptitude questions with their answers

0 Answers   BPCL Bharat Petroleum, HPCL,


Two circles , one circle is inscribed and another circle is N outscribed over a square. What is the ratio of area of inner to outer circle.

0 Answers   CMC,


the program requires 4000(n)1/2 [ie square root of n].if size of program was increased by 1% then calculate the percentage change in size of program.

0 Answers   Accenture,


A pipe can fill a tank in 30 min B can fill in 28 min then if 3/4 th of tank can be filled by B pipe and after wards bothare opened then how much time is required by both the pipes to fill the tank completely. note: the values of A and B may slitely vary be ware.

0 Answers   IIT Delhi,


A car has front 30 and rear 20. If front rotate 240 time. Find back wheel rotation.

5 Answers   3D PLM,


what sort of questions may be asked

0 Answers   ICICI,


A coin with p(head)=0.6 is tossed twice.What is the probability that at least one head occurs?

1 Answers  


Rahul took a part in cycling game where 1/5 ahead of him and 5/6 behind him then total number of participants?

0 Answers   HCL, Infosys,


Categories