Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

write a function that prints a table of values of sines and cosine in between 0 and 1

0 votes
asked Mar 23, 2020 by Adithya S (170 points) 1 flag
edited Mar 23, 2020 by Adithya S

3 Answers

–3 votes
answered Mar 24, 2020 by Tårún Såthyå9.0 (90 points)
#include<stdio.h>

void main
–1 vote
answered Mar 25, 2020 by Ravon Salcido STUDENT (120 points)
F=9/5C+ 32 = 32.0 F
0 votes
answered Apr 5, 2020 by Luigi Rodorigo (280 points)
You mean something like that?
#include <stdio.h>
#include <stdint.h>
#include <math.h>

void print_sin_cos(double step) {

    
    for (double x=0;x<=1;x+=step) {
        printf("sin(%f)=%f\n", x, sin(x));
        printf("cos(%f)=%f\n", x, cos(x));
        
    }
    

}

int main()
{
    
    double step = 0;
    printf("Enter the desired step (es. 0.1):\n");
    if (scanf("%lf", &step)==1)
        print_sin_cos(step);

}
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.
...