1. Develop an algorithm for calculating the price of a square rug, a program called Carpet. Absorb the length / width of the rug. Set a price per square meter as fixed and give it the value you want in NIS. Calculate the area of the rug and its price. Show as output the price of the rug. In a right triangle the angle of the excess length in a triangle is equal to the square root of the connection of the squares of the other two sides. Write an algorithm and program in java that captures the lengths of the two sides of the triangle at right angles and prints the rest length.