Question: Programming Challenge # 1 6 : Create a C + + program with two functions: main ( ) and Triangle ( ) . The program
Programming Challenge #:
Create a C program with two functions: main and Triangle
The program must read data from a text file.
The data must be in a matrix format with columns and an initially unknown number of rows.
Each row of data defines a triangle on the plane, where the first two numbers are the and coordinates of one vertex of the triangle, then and of another vertex, and then and of a third.
The program must read this data and display all given triangles on the graphics screen.
Demonstrate the functionality of the program with two sets of example data:
A file whose data defines triangles inside one big, as in the picture:
A file whose data defines a point star, as in the picture:
Show the output to your instructor to check the performance of the program. Explain how you split the functionality of the program between the two functions. This means that you need to explain what the Triangle and main functions do in your program?
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
