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.
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.
Chapter5: Looping
Section: Chapter Questions
Problem 1RQ: A structure that allows repeated execution of a block of statements is a(n) _____________. sequence...
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](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F3c5a5d39-4610-4542-84f3-e3a5fb07be7c%2F37f6d749-bf0f-4b87-92ef-f471357baecd%2F5rqg0z8_processed.jpeg&w=3840&q=75)
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", °rees);
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](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F3c5a5d39-4610-4542-84f3-e3a5fb07be7c%2F37f6d749-bf0f-4b87-92ef-f471357baecd%2Fwynx1f_processed.jpeg&w=3840&q=75)
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", °rees);
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
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 5 steps with 2 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Knowledge Booster
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
![Microsoft Visual C#](https://www.bartleby.com/isbn_cover_images/9781337102100/9781337102100_smallCoverImage.gif)
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
![Microsoft Visual C#](https://www.bartleby.com/isbn_cover_images/9781337102100/9781337102100_smallCoverImage.gif)
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage