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

In town of 500 people, 285 read Hindu and 212 read Indian express and 127read Times of India 20 read hindu and times of India and 29 read hindu and Indian express and 35 read times of India and Indian express. 50 read no news paper. Then how many read all the three paper?

16 Answers   Cognizant, CTC, CTS,


Find the correct meaning of the following phrase: To be in the air

0 Answers   Hexaware,


In 1000 wine bottles stack 10 are poisoned given 10 rats what is the minimum number of tries to find the poisoned one. Rat dies once it licks the poisoned wine.

11 Answers   Google, IBM, Infosys, KPIT, Yahoo,


How many five digit numbers are there such that two left most digits are even and remaining are odd?

0 Answers   HCL, Infosys,


solution for the question: NOON+MOON+SOON=JUNE, each alphabet represents the number. what is the answer? what does JUNE represents?

4 Answers   Infosys,


2222-222-22-2 = ?

7 Answers   Franklin Templeton,


pls send me US TECNOLOGYS placement papers.

0 Answers  


what is the formula to find resistance if the terms density,reluctance,sensitivity,voltage,current are given

3 Answers   Cognizant, CTS, Solartis, TCS,


plz send me model paper of sbi clerk exam paper my e-mail id is aakash_rich@yahoo.com

2 Answers  


how to clear online aptitude test

1 Answers   Scope International,


If P=Total number of components, Q = number of defective components .What is the % of non defective components?

0 Answers   TATA,


Make a square by drawing only one line

0 Answers   BPCL Bharat Petroleum, Sonata,


Categories