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 |
A can do a piece of work in 20 days, which B can do in 12 days. In 9 days B does ¾ of the work. How many days will A take to finish the remaining work?
A man drives at a speed of 40 miles/hr. His wife left 30 mins. late with 50 miles/hr speed. when will they meet ?
Four of the following are alike in a certain way and hence form a group.Which of the following does not belong to that group? A) 9 B) 216 C) 8 D) 64 E) 512
3 Answers ITC Indian Tobacco Company, SSC,
A lady has fine gloves and hats in her closet- 13 blue, 27 red, and 40 yellow. The lights are out and it is totally dark. In spite of the darkness, she can make out the difference between a hat and a glove. She takes out an item out of the closet only if she is sure that if it is a glove. How many gloves must she take out to make sure she has a pair of each color?
Find the next letter in the series c,o,m,p,u,t,e--
Hello , can any one inform me about any good Bank PO training institute at Bangalore.
The minute hand of a clock overtakes the hour hand at intervals of 64 minutes of correct time. How much a day does the clock gain or lose?
A persons age is similar to the year he was born(last two digits is counted as age).
With a 4/5 full tank a vehicle can travel 12 miles, how far can it travel with a 1/3 full tank
Please send the model question paper to my email id this is my email id :lalitha_7stars@rediffmail.com
Two big cubes divided into 125 small cubes each. they placed horizontally. If column no. 1 , 3, 5, 6, 8, 10 is removed from the cubes then remaining cubes columns is painted by blue color then, 1) how many cube 0 side painted? 2) how many cube 1 side painted? 3) how many cube 2 side painted? Explain how to do ?
A man sells an article at a profit of 25%. if he had bought it at 20% less and sold it for Rs.10.50 less., he would have gained 30%. Find the cost price of the article?