i want to make a program that shows answer of a giving question
question is find the five digit number that if we divide the number by 25,30,40,
so the reminder will be 20,2,35;
how will i make it ?
what will be the statements of for loop
1 2 3 4 5 6 7 8 9
#include<iostream>
int main()
{
int i ;
for(i = 0; i <99999; i++)
{
}
}
A start: for(i = 10000; i <99999; i++) 10,000 less numbers to test straight away!
Next step perhaps, read the tutorial on this site and look up \ and % as modular arithmetic operators for integer division and remainder mean respectively.
If you divide a number by 25 and get 20 remainder you get information that will enable you to reduce the number of possibilities in the loop.