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.
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
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

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

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

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.Recommended textbooks for you

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)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON

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)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON

Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education