subject

An astronomer is making measurements with his telescope when he notices that his vision field is off by x micronanometers (which we will assume is a measurement that exists) to the right. His telescope can only be moved to the right or to the left, however, and only via his automated, highly-calibrated machinery by certain predetermined fixed integer amounts. If, for example, one of these amounts is 7 micronanometers, then he can move his vision field by any multiple of 7 micronanometers to the left or right. Given a value of x and a set {m1, m2, . . . , mn} of predetermined fixed move- ment amounts, your job will be to advise the astronomer as to which of the movements to choose, how many times the movement should be applied, and the direction of the movement so that he can make his field of vision perfect.
You may assume that x is a standard Java integer, but you may want to use the java. BigInteger class for the mi.
It is guaranteed that a solution exists.
3 Input/Output
The input file (input. txt) in the home directory will consist only of positive integers. The first line will be the value of x. The following lines will hold the values of the mi, one per line.
Your output file (output. txt) should hold a sequence of lines with 2 single- space-separated numbers per line. These will be interpreted as instructions for telescope movement. The line mi ywill mean to move the telescope mi micronanometers y times. (If y is positive, then it will be moved to the right; if y is negative, then it will be moved to the left.)

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 13:30
In your ice breakers game, what happens when the snowball collides with one of the snowboards? a. the player's score will increase. b. the snowball will leave the play area. c. the snowball will be destroyed. d. the snowball will bounce.
Answers: 1
question
Computers and Technology, 21.06.2019 17:10
Can be categorized as popularity, relevancy, and user satisfaction. select one: a. mobile search seo b. ranking factors c. serp d. web analytics
Answers: 1
question
Computers and Technology, 22.06.2019 07:50
In this lab, you complete a prewritten c++ program for a carpenter who creates personalized house signs. the program is supposed to compute the price of any sign a customer orders, based on the following facts: the charge for all signs is a minimum of $35.00. the first five letters or numbers are included in the minimum charge; there is a $4 charge for each additional character. if the sign is made of oak, add $20.00. no charge is added for pine. black or white characters are included in the minimum charge; there is an additional $15 charge for gold-leaf lettering. instructions ensure the file named housesign.cppis open in the code editor. you need to declare variables for the following, and initialize them where specified: a variable for the cost of the sign initialized to 0.00 (charge). a variable for the number of characters initialized to 8 (numchars). a variable for the color of the characters initialized to "gold" (color). a variable for the wood type initialized to "oak" (woodtype). write the rest of the program using assignment statements and ifstatements as appropriate. the output statements are written for you. execute the program by clicking the run button. your output should be: the charge for this sign is $82. this is the code, // housesign.cpp - this program calculates prices for custom made signs. #include #include using namespace std; int main() { // this is the work done in the housekeeping() function // declare and initialize variables here // charge for this sign // color of characters in sign // number of characters in sign // type of wood // this is the work done in the detailloop() function // write assignment and if statements here // this is the work done in the endofjob() function // output charge for this sign cout < < "the charge for this sign is $" < < charge < < endl; return(0); }
Answers: 1
question
Computers and Technology, 22.06.2019 15:10
David is in week 3 of his current ashford course and has a paper due by monday night at midnight. he has finished everything but the concluding paragraph. as he boots up his computer to work on it, he sees a flash across the screen and then the screen goes black. he begins to panic as he tries desperately to turn the laptop back on. david should have saved his work on what kind of portable device?
Answers: 2
You know the right answer?
An astronomer is making measurements with his telescope when he notices that his vision field is off...
Questions
Questions on the website: 13722367