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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

cgl2010 tier 2 ki merit kya rhgi

2255


36:4 :: 9: ?

1195


Ms. Anurag Awasthi deposits an amount of Rs. 56500 to obtain a simple interest at the rats of 12% p.a. for 3 years. What total amount will Mr. Anurag Awasthi get at the end of 3 year?

1675


No. of animals is 11 more than the no. of birds. If the no. of birds were the no. of animals and no. of animals were the no. of birds( ie., interchanging no.s of animals and birds.), the total no. of legs get reduced by one fifth (1/5). How many no. of birds and animals were there?

1842


A son and father goes for boating in river upstream . After rowing for 1 mile son notices the hat of his father falling in the river. After 5min. he tells his father that his hat has fallen. So they turn around and are able to pick the hat at the point from where they began boating after 5 min.Tell the speed of river.

1245


A small town's industries have a total turnover of Rs. 25,00,000. If the town council plans to raise Rs.170,000 through octroi levy, what % levy should it charge on the industries?

1337


electrical question in diploma level

7741


Two distinct no's are taken from 1,2,3,4......28. Find the probability that their sum is less than 13

1503


1,2,3,4,5,6,7,8,9 station. route between any 2 station is there only if the 2 digit nob. is divisible by 3. e.g. route exist between 1 to 2 because 12 is divisible by 3 how many station have routes to 8 either direct or indirect

1130


The numbers A, B and C make a sum of 98. If the ratio A:B is 2:3 and that B:C is 5:8, the third number would be

1471


Two coins one with HEAD IN BOTH SIDES and the other coin HEAD IN ONE SIDE AND TAIL IN THE OTHER SIDE is in a box,a coin is taken at random and FOUND HEAD IN ONE SIDE .what is the probability that THE OTHER SIDE IS HEAD?

1209


The sum of the digits of a two digit number is 8.When 18 is added to the number, the digits are reversed. Find the number?

1136


Find the value of @@+25-++@16, where @ denotes "square" and + denotes "square root".

2481


Tata Tea cost rupees 95 per kg, Red label costs rupees 100 per kg and Lipton cost rs 70 per kg. How many kgs of each should be blended to produce 100 kg mixture worth Rs.90 per kg, give that the quantity of Red label and Lipton are equal.

1142


The area of the maximum size of the circle described from the 10 square inch square?

1361