program that prompts the user whetherto convert from Cartesian…

Question Answered step-by-step program that prompts the user whetherto convert from Cartesian… program that prompts the user whetherto convert from Cartesian coordinates to polar coordinates andthe other way around; and then prompts the user for the nameof an input file. The input file will contain a number ofcoordinates. The program will read in and convert eachcoordinate in the input file. The converted coordinates areprinted in an output file called”convert.out”. Use a structuresto represent the points. (PLEASE SHOW THEOUTPUT AND INPUT FILE ON THE PRINT SCREEN)In order to do this assignment, you will need the mathematicsfunctions sin, cos, andtan. These functions are in the mathematicslibrary. You need to include this library in your program(i.e. the statement: #include must beadded to your program). The sin,cos, and tan functions expects adouble value angle as anargument, and returns the double value as aresult. The value for angle must be inradians. For example, sin(π/2) =1. Note π/2 = 90°.Suggested help for completing the assignment: Firstwrite a program that prompts the user to select the type ofconversion, prompts the user for each coordinate, and then displaysthe converted coordinate on the monitor screen. When you aresatisfied with the behavior of this program, modify the program toread in coordinates from an input file and put the result in theoutput file convert.out. Computer Science Engineering & Technology C++ Programming COMPUTER CS301 Share QuestionEmailCopy link Comments (0)