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

A, B, C made trips to PIZZA centre B made 2.4 times more trips then ! , C made 6 more then A Total Min trips are

1275


(7*7=49)(4*9=36)(3*6=18) (1*8=8)

1346


A car is filled with four and half gallons of fuel for a round trip.If the amount of fuel taken while going is 1/4 more than the amount taken for coming, what is the amount of fuel consumed while coming back?

1467


If Log2 x - 5 Log x + 6 = 0, then what would the value / values of x be?

1409


02: 1/3 of girls , 1/2 of boys go to canteen .What factor and total number of classmates go to canteen?

1526


3x+4y=10, x3 + y3=6, What is the minimum value of 3x+11y=?

1178


which of the following leaders was not among the moderates

2380


From 5 different green balls, four different blue balls and three different red balls, how many combinations of balls can be chosen taking at least one green and one blue ball?

1407


There are 4 boys and 3 girls. What is the probability the boys and girls sit alternately?

1269


Find the next letter in the series O,T,T,F,F,S,S--

1227


A sequence is given. You should find out error & write correct 1 2 5 10 13 26 29 48.

1272


If the equation x2 - 3x + a = 0 has the roots (0,1) then value of a is ?

1241


Find sqrt of 113 up to 3 decimal places.

1241


A person went to shop and asked for change for 1.15 paise. But he said that he could not only give change for one rupee but also for 50p, 25p, 10p and 5p. What were the coins he had ?

1451


Girish invested a certain amount at the rate of 8% p.a. for 6 year to obtain an amount of Rs. 28046.How much amount did Girish obtain as simple interest?

1606