Question
Can you show me how to form a c program for task 3? The output is shown below. Thank you Task 1 1. create a
Can you show me how to form a c program for task 3? The output is shown below. Thank you
Task 1 1. create a function called cubic, which takes an integer X as input and returns a float Y as the output, satisfying the equation Y = 1000X - 30000X + 200000X + 500000 2. create a int array of size 21 that contain data of cubic(0) to cubic(20) 3. print the table of X and Y values from the array data. Task 2 1. create a function called graph, which takes a pointer to int called table as the input, and display a graph that satisfy the following criteria: a. vertical axis(y-axis) is represented by | b. horizontal axis (x-axis) is represented by - c. origin is represented by + d. line of graph is represented by % e. each column(x-axis) represent 1 unit f. each row(y-axis) represent 50000 units, for example: | row 2: from 50001 to 100000 | row 1: from 1 to 50000 | row 0: x-axis, all use - except x-intercept use % g. only need to show graph of x-value from 0 to 20 inclusive, and y-value from 0-1000000 h. x or y intercept is showed as % instead of - if any i. 2 space is padded between each column of the graph, but for x-axis whole line use - 2. pass the pointer to data as input to the function graph. Task 3 1. Use code page 437 for this level. 2. Add title to the graph, remember to show the square: y = 100[(x-10)(x-110) + 500] 3. label each row and column 4. fill the area under the graph using 0xDB from code page 437 5. fill the area above the graph using 0xB0 from code page 437 6. move the table to right side of the graph, use box drawing and block characters from code page 437 to draw the table, and also the axes 7. change the marking of the points of the graph to 2 characters >
Output:
100[(x-10)2 (x-110) + 500] Y 00 NOU WNPO 1000000 950000 900000 850000 - 800000 750000 700000 - 650000 600000 - 550000 500000 450000 400000 350000 300000 - 250000 - 200000 150000 100000 50000 0 0 500000 671000 788000 857000 884000 875000 836000 773000 692000 599000 500000 401000 308000 227000 164000 125000 116000 143000 212000 329000 10 11 12 13 14 15 16 17 18 19 5 w 10 11 12 13 14 15 16 17 18 19 20Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started