Take two numbers as input. Store those two numbers in the “a” and “b” variables.
1. Perform addition operation and store it in a variable. 2. Perform subtraction operation and store it in a variable.
Note: ● Each variable will contain a value from 0-9 ● The value of a has to be greater than the value of b. ● When you choose the values for the variable make sure that the addition of those two values can’t be greater than 10. ● After taking the number as input make sure to substitute30H from the number. ○ For example, You take 3 as input. Then AL register will contain 33H. So to get 3 for your working purpose perform substitute 30H from it and then store it in a variable.
using Assembly language
Answers
Answered by
0
Answer:
// C++ program to find x such that a % x is equal
// to b.
#include <bits/stdc++.h>
using namespace std;
void modularEquation(int a, int b)
{
// if a is less than b then no solution
if (a < b) {
cout << "No solution possible " << endl;
return;
}
// if a is equal to b then every number
// greater than a will be the solution
// so its infinity
if (a == b) {
cout << "Infinite Solution possible " << endl;
return;
}
// all resultant number should be greater than
// b and (a-b) should be divisible by res
Similar questions