How to find a pair of numbers with a total between 50 and 100
Answers
Answered by
0
Answer:
you need to do programming for this task.
Step-by-step explanation:
suppose you want pairs of only two numbers:
in any programming language, like C++,
first define three terms, A, B and T, as integers.
A is the first number of the pair, B is the second one and T is the total of both.
now define initial value of T as 50 and increment it upto 100.
then define initial value of A as 1 and increment it upto the run time value of t-1.
now define the value of B as T - A.
you can use any incremental loops of your choice, for example, "if", "do", "do while", etc to loop around the terms.
take the values of A and B as the output, and you will get all the pairs.
Similar questions