Question

3871*X+2899=0 mod(9679)

3871*X+2899=0 mod(9679)

0 0
Add a comment Improve this question Transcribed image text
Answer #1

#include<iostream>

using namespace std;

//main is the function from which execution of

//program starts

int main()

{

int i=0,j;

while(1)

{

//j stores the value of LHS of the expression

//i stores the value of X.

//we are increments value of i by the time it doesn't follows the codition.

j=3871*i+2899;

if(j%9679==0)

break;

//Once the value of i satisfies we break the loop and print the value of i which is X in the equation

i++;

}

cout<<i;

}

F:ACodes Untitled7.exe 8058 Process exited after 0.0229 seconds with return value 0 Press any key to continue . .

So,the value of X comes out to be 8058.

if you have any doubts please feel free to ask in comments.

please do upvote.

Thank You!

Add a comment
Know the answer?
Add Answer to:
3871*X+2899=0 mod(9679)
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT