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 |
There is a carem board where 4 No of player can play at a time but 5 No of player have to play each to every. In this case how many minimum game will be play.?
In a colony there are some families. Each of them have children but different in numbers.Following are conditions a> no of adult>no of sons>no of daughters>no of families. b>each sister must have atleast one brother and should have at the most 1 sister. c> no of children in one family exceeds the sum of no of children in the rest families Tell the no of families
if the ratio of men to women in a particular dormitory is 5:3 which of the following could not be the number of residents in the dormitory
What is difference between public sector bank and government bank?
first day of 1999 is sunday.what day is the last day?
In covering a distance of 30 km, abhay takes 2 hours more than sameer. If abhay doubles his speed, then he would take 1 hour less than sameer. Abhay's speed is?
I'm also facing the same problem. plz send me model question papers and answers which help me to face interview for clerical staff in sbi.
On Monday a manufacturer processed a batch of bats, on Tuesday he processed three times as many, and on Wednesday he processed 4000 bats. In the three days, He processed 16000 bats. How many did he process on Tuesday?
sqrt(0.16)+cubic root(0.027) equals
Supposing a clock takes 7 seconds to strike 7. How long will it take to strike 10?
two, trains, one from howrah to patna and the other from patna to howrah, start simultaneously. After they meet, the trains reach their destinations after 9 hours and 16 hours respectively. What is the ratio?
they asked the temperature problem.it was same as previous papers.the ratio was -t*t/6+4t+12.