I having troubles running this C linux program. please use my code to fix any errors that need to be removed or added. If it needs sin() cos() tan() - Please add displayTriTab  • Receive an integer called degrees that represents the number of degree for incrementation and return nothing. • Display the heading “--- TRIGONOMETRIC TABLE ---” center over the table •A blank line • Display the column headings as sown on the output. • A blank line. • Produce a table based from 0 to 360 degrees in increments based on the users input. • The table columns will be as follows: 1. Degrees ( Format: Right justified, no decimal places) 2. The radian value for the number of degrees in column 1 3. The sine value for the degrees in column 4. The cosine value for the degrees in column 5. The tangent value for the degrees in column 6. Tangent values for 90 and 270 will be infinity • The 360 degrees row will always be the last row even if the increment value entered would not [Bold] the code I do not understand how to write as confused

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

I having troubles running this C linux program.

please use my code to fix any errors that need to be removed or added.

If it needs sin() cos() tan() - Please add

displayTriTab 
• Receive an integer called degrees that represents the number of degree for incrementation and return nothing.
• Display the heading “--- TRIGONOMETRIC TABLE ---” center over the table
•A blank line
• Display the column headings as sown on the output.
• A blank line.
• Produce a table based from 0 to 360 degrees in increments based on the users input.
• The table columns will be as follows:
1. Degrees ( Format: Right justified, no decimal places)
2. The radian value for the number of degrees in column 1
3. The sine value for the degrees in column
4. The cosine value for the degrees in column
5. The tangent value for the degrees in column
6. Tangent values for 90 and 270 will be infinity
• The 360 degrees row will always be the last row even if the increment value entered would not

[Bold] the code I do not understand how to write as confused

00
Q ✪ 1
include <stdio.h>
#include <math.h>
main () {
int degrees, increment;
double radians, sine, cosine, tangent;
/*Welcome the User to the program*/
;
printf("\nWelcome to trigTable.\n");
// Ask the user to select an increment of degrees
//Display table heading
printf("\n--- TRIGONOMETRIC TABLE ---\n");
printf("\nPlease select the number of degrees for the increment: ");
scanf("%d", &degrees);
//Loop from 0 to 360 degrees in increments
// Description on what the program will do
printf("\nThis program will print a table of trigonometic values from 0 to 360 degrees in increments selected by the user. \n")
OO
{
// calculate radias, sine, cosine, and tangent
degrees * M_PI / 180.0;
Q +
radians
sine sin (radians);
cosine cos (radians);
tangent tan (radians);
for (degrees = 0; degrees <= 360; degrees += increment)
// Print results for this degree
Trigg.png
// Display column headings
printf("\n%10s %10s %10s %10s %10s\n", "Degrees", "Radians", "Sine", "Cosine", "Tangent");
printf("%10s %10s %10s %10s\n %10s"," ------","
}
Trig.png
1
3
In function 'main':
error out
trigTable.c: (.text+0xe7): undefined reference to 'sin'
trigTable.c: (.text+0x106): undefined reference to `cos'
trigrable.c: (.text+0x125): undefined reference to `tan'
trigTable.c: (.text+0x1a5): undefined reference to `trig_table' 23 at 7:30 PM
collect2: error: ld returned 1 exit status
first
if (degrees == 90 || degrees == 270) {
printf("%10d%10.4f %10.4f %10.4f\n", degrees, radians, sine, cosine, tangent);
O
);
Q Search
Q
Q
Screenshot at Mar 28 19-36-34.png
Ò @ Q Search
Print results for this degree
x +
// Thank you and Goodbye to the user
Qo
printf("\nThank you for using trigTable. Byebye!\n");
trig_table (increment);
Second
return 0;
.ip
if (degrees ==90 11 degrees == 270) {
printf("%10d 10.4f 10.4f%10.4f\n", degrees, radians, sine, cosine, tangent);
Ter
LAK
SSE
>>
Transcribed Image Text:00 Q ✪ 1 include <stdio.h> #include <math.h> main () { int degrees, increment; double radians, sine, cosine, tangent; /*Welcome the User to the program*/ ; printf("\nWelcome to trigTable.\n"); // Ask the user to select an increment of degrees //Display table heading printf("\n--- TRIGONOMETRIC TABLE ---\n"); printf("\nPlease select the number of degrees for the increment: "); scanf("%d", &degrees); //Loop from 0 to 360 degrees in increments // Description on what the program will do printf("\nThis program will print a table of trigonometic values from 0 to 360 degrees in increments selected by the user. \n") OO { // calculate radias, sine, cosine, and tangent degrees * M_PI / 180.0; Q + radians sine sin (radians); cosine cos (radians); tangent tan (radians); for (degrees = 0; degrees <= 360; degrees += increment) // Print results for this degree Trigg.png // Display column headings printf("\n%10s %10s %10s %10s %10s\n", "Degrees", "Radians", "Sine", "Cosine", "Tangent"); printf("%10s %10s %10s %10s\n %10s"," ------"," } Trig.png 1 3 In function 'main': error out trigTable.c: (.text+0xe7): undefined reference to 'sin' trigTable.c: (.text+0x106): undefined reference to `cos' trigrable.c: (.text+0x125): undefined reference to `tan' trigTable.c: (.text+0x1a5): undefined reference to `trig_table' 23 at 7:30 PM collect2: error: ld returned 1 exit status first if (degrees == 90 || degrees == 270) { printf("%10d%10.4f %10.4f %10.4f\n", degrees, radians, sine, cosine, tangent); O ); Q Search Q Q Screenshot at Mar 28 19-36-34.png Ò @ Q Search Print results for this degree x + // Thank you and Goodbye to the user Qo printf("\nThank you for using trigTable. Byebye!\n"); trig_table (increment); Second return 0; .ip if (degrees ==90 11 degrees == 270) { printf("%10d 10.4f 10.4f%10.4f\n", degrees, radians, sine, cosine, tangent); Ter LAK SSE >>
Example of Output
Welcome to trigTable.
This program will print a table of trigonometric values
from 0 to 360 degrees in increments selected by the user.
Please the select the number of degrees for the increment: 30
TRIGONOMETRIC TABLE
Degrees Radians
0
30
60
90
120
150
180
210
240
270
300
330
360
0.0000
0.5236
1.0472
1.5708
2.0944
2.6180
3.1416
3.6652
4.1888
4.7124
5.2360
5.7596
6.2832
sine
0.0000
0.5000
0.8660
1.0000
0.8660
0.5000
0.0000
-0.5000
-0.8660
-1.0000
-0.8660
-0.5000
-0.0000
cosine tangent
1.0000
0.8660
0.5000
0.0000
-0.5000
-0.8660
-1.0000
-0.8660
-0.5000
-0.0000
0.5000
0.8660
1.0000
Thank you for using trigTable. Bye!
0.00000
0.57735
1.73205
infinity
-1.73205
-0.57735
-0.00000
0.57735
1.73205
infinity
-1.73205
-0.57735
-0.00000
Transcribed Image Text:Example of Output Welcome to trigTable. This program will print a table of trigonometric values from 0 to 360 degrees in increments selected by the user. Please the select the number of degrees for the increment: 30 TRIGONOMETRIC TABLE Degrees Radians 0 30 60 90 120 150 180 210 240 270 300 330 360 0.0000 0.5236 1.0472 1.5708 2.0944 2.6180 3.1416 3.6652 4.1888 4.7124 5.2360 5.7596 6.2832 sine 0.0000 0.5000 0.8660 1.0000 0.8660 0.5000 0.0000 -0.5000 -0.8660 -1.0000 -0.8660 -0.5000 -0.0000 cosine tangent 1.0000 0.8660 0.5000 0.0000 -0.5000 -0.8660 -1.0000 -0.8660 -0.5000 -0.0000 0.5000 0.8660 1.0000 Thank you for using trigTable. Bye! 0.00000 0.57735 1.73205 infinity -1.73205 -0.57735 -0.00000 0.57735 1.73205 infinity -1.73205 -0.57735 -0.00000
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
File Input and Output Operations
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education