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 |
what is ment SEBI?
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?
There N stations on a railroad. After adding x stations 46 additional tickets have to be printed. Find N and X.
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.
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.
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.
A car has front 30 and rear 20. If front rotate 240 time. Find back wheel rotation.
what sort of questions may be asked
A coin with p(head)=0.6 is tossed twice.What is the probability that at least one head occurs?
Rahul took a part in cycling game where 1/5 ahead of him and 5/6 behind him then total number of participants?