Computers and Technology

Write a program that takes as input two opposite corners of a rectangle: (x1,y1) and (x2,y2). finally, the user is prompted for the coordinates of a third point (x, y). the program should print boolean value true or false based on whether the point (x, y) lies inside the rectangle. if the point lies on the rectangle, the program should print false.

answer
Answers: 1

Similar questions

Предмет
Computers and Technology, 02.07.2019 16:20, DarcieMATHlin6217
Write a program that takes input from stdin with the following properties: input is split into lines delimited by newline characters.every line has the same length.every line consists of an arbitrary sequence of hyphens ("-") and asterisks ("*").the final line of input is terminated by a newline character.in this challenge, each character in the input will have coordinates defined by (line number, character number), starting at the top and left. so the first character on the first line will have the coordinates (1,1) and the fifth character on line 3 will have the coordinates (3,5).the program should find a box (or boxes) in the input with the following properties: the box must be defined by two pairs of coordinates corresponding to its top left and bottom right corners.it must be the minimum bounding box for some contiguous group of asterisks, with each asterisk being horizontally or vertically (but not diagonally) adjacent to at least one other asterisk in the group. the box should not strictly bound the group, so the coordinates for the box in the following input should be (2,2)(3,3) not (1,1)(4,**--** should not overlap (i.e. share any characters with) any other minimum bounding boxes.of all the non-overlapping, minimum bounding boxes in the input, it should be the largest.if any boxes satisfying the conditions can be found in the input, the program should return an exit code of 0 and, for each box, print a line to stdout with the two pairs of coordinates.so, given the file “groups.txt” with the following content: -*--**running your program with this input would look something like this: > cat groups.txt | bounding-box(1,1)(2,2)this is because the larger groups on the right of the input have overlapping bounding boxes, so the returned coordinates bound the smaller group on the top left.
Answers: 2
Do you know the correct answer?
Write a program that takes as input two opposite corners of a rectangle: (x1,y1) and (x2,y2). final...

Questions in other subjects: