Can someone help me .No matter what i do i just cant get this C program to properly compile and run .I keep getting these errors during the compiling process.

Microsoft Visual C#
7th Edition
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Joyce, Farrell.
Chapter5: Looping
Section: Chapter Questions
Problem 1RQ: A structure that allows repeated execution of a block of statements is a(n) _____________. sequence...
icon
Related questions
Question
Can someone help me .No matter what i do i just cant get this C program to properly compile and run .I keep getting these errors during the compiling process.
In function '
warning: implicit declaration of function '
displayTriTab (degrees);
At top level:
warning: conflicting types for '
void displayTriTab (int degrees) {
note: previous implicit declaration of '
displayTriTab (degrees);
A
/tmp/cc8shLrA.o: In function displayTriTab':
trigTable.c: (.text+0xf1): undefined reference to 'sin'
trigTable.c: (.text+0x110): undefined reference to `cos'
trigTable.c: (.text+0x12f): undefined reference to 'tan'
collect2: error: ld returned 1 exit status
[-Wimplicit-function-declaration]
' [enabled by default]
was here
Transcribed Image Text:In function ' warning: implicit declaration of function ' displayTriTab (degrees); At top level: warning: conflicting types for ' void displayTriTab (int degrees) { note: previous implicit declaration of ' displayTriTab (degrees); A /tmp/cc8shLrA.o: In function displayTriTab': trigTable.c: (.text+0xf1): undefined reference to 'sin' trigTable.c: (.text+0x110): undefined reference to `cos' trigTable.c: (.text+0x12f): undefined reference to 'tan' collect2: error: ld returned 1 exit status [-Wimplicit-function-declaration] ' [enabled by default] was here
#include<stdio.h>
#include<math.h>
void displayTritab (int degrees);
int main() {
}
}
int degrees;
printf("Welcome to trigTable.\n");
printf("This program will print a table of trigonometric values\n");
printf("from 0 to 360 degrees in increments selected by the user.\n\n");
printf("Please the select the number of degrees for the increment: ");
scanf("%d", &degrees);
displayTriTab (degrees);
printf("\nThank you for using trigTable. Bye!\n");
return 0;
void displayTriTab (int degrees) {
const double PI = acos (-1.0);
printf("\t---\tTRIGONOMETRIC TABLE\t---\t\n\n");
printf("%-10%-10s%-10s%-10s%-10s\n", "Degrees", "Radians", "Sine", "Cosine", "Tangent");
for (int i = 0; i <= 360; i+= degrees)
{
double radians = i* (PI / 180.0);
double sin_val= sin (radians);
double cos_val= cos (radians);
double tan_val= tan (radians);
if (i == 90 || 1==270)
printf("%-10d%-10.4f %-10.4f %-10.4f %-10s\n", i, radians, "N/A", cos_val, "N/A");
printf("%-10d%-10.4f % -10.4f %-10.4f % -10.4f\n", i, radians, sin_val, cos_val, tan_val);
else
}
"trigTable.c" 47L, 1344C
Transcribed Image Text:#include<stdio.h> #include<math.h> void displayTritab (int degrees); int main() { } } int degrees; printf("Welcome to trigTable.\n"); printf("This program will print a table of trigonometric values\n"); printf("from 0 to 360 degrees in increments selected by the user.\n\n"); printf("Please the select the number of degrees for the increment: "); scanf("%d", &degrees); displayTriTab (degrees); printf("\nThank you for using trigTable. Bye!\n"); return 0; void displayTriTab (int degrees) { const double PI = acos (-1.0); printf("\t---\tTRIGONOMETRIC TABLE\t---\t\n\n"); printf("%-10%-10s%-10s%-10s%-10s\n", "Degrees", "Radians", "Sine", "Cosine", "Tangent"); for (int i = 0; i <= 360; i+= degrees) { double radians = i* (PI / 180.0); double sin_val= sin (radians); double cos_val= cos (radians); double tan_val= tan (radians); if (i == 90 || 1==270) printf("%-10d%-10.4f %-10.4f %-10.4f %-10s\n", i, radians, "N/A", cos_val, "N/A"); printf("%-10d%-10.4f % -10.4f %-10.4f % -10.4f\n", i, radians, sin_val, cos_val, tan_val); else } "trigTable.c" 47L, 1344C
Expert Solution
steps

Step by step

Solved in 5 steps with 2 images

Blurred answer
Knowledge Booster
Top down approach design
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
  • SEE MORE QUESTIONS
Recommended textbooks for you
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage