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

There are A,B techers and C,D doctors.Find the possible no of combinations that should not be repeated more than once?

1361


Price of product is reduced by 30%. What % should be increased to make it 100 % ?

1160


JSW steel online test questions

953


2. Why would you choose a database system instead of simply storing data in operating system files? Give and explain advantages of using DBMS.

1537


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?

1785


Find the next number in the series 1,2,5,10,,15,22--

1182


Petrol prices increased by 40% expected hike in taxi & auto charges so, people may use public transport systems. What do you infer?

1179


Hello My name is vijay right now I'm preparing for SBI po, I am good at aptitude but not better. I am lagging time you know competitive exams are to answer in span of time. So any website regarding aptitude short cuts or tricks Pls post to my mail. I am waiting

2112


What is the value of a property, which has been insured at the rate of 1/6% of its value, if the annual premium paid on it is Rs. 83.33 (in Rs.)?

1923


There are 6 people W,H,M,C,G,F who are murderer, victim, judge, police, witness, hangman. There was no eyewitness only circumstantial witness. The murderer was sentenced to death. Read following statement and determine who is who.

1113


There are 200 employees in a company. An external vendor is chosen to Serve coffee twice a day. 100 coffee cups were offered by the company but as an incentive to have the cups in tact at the end of the day, the company offered 30 paise for every cup remained safely and charged 90 paise for every broken cup. At an end of a day, the vendor received Rs. 24. How many cups did the vendor break? 10, 20, 8, 5?

2218


The day before yesterday was WEDNESDAY then the day after 2morrow is?

1190


A finishes a work in 12 days and B finishes same work in 14 days.If they work for a day alternately with A beginning, how many days will it take to complete the work?

1141


in a market 4 man are standing .the average age of the four before 4years is 45,aftyer some days one man is added and his age is 49.what is the average weight of all?

1407


If g (0)=g (1)=1 And: g (n)= g (n-1) + g (n –2) find g (6);

1154