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 |
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
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?
solution for the question: NOON+MOON+SOON=JUNE, each alphabet represents the number. what is the answer? what does JUNE represents?
2222-222-22-2 = ?
pls send me US TECNOLOGYS placement papers.
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
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?
Make a square by drawing only one line
0 Answers BPCL Bharat Petroleum, Sonata,