Write a program to find the value of Cosign in C
#include<stdio.h>
#include<math.h>
#define pi 3.1416
#define MAX 180
void main()
{
int angel;
float a=0.0,b=0.0;
printf("Enter the value of Angel: ");
scanf("%d",&angel);
if(angel<=MAX)
{
a=(pi/MAX)*angel;
b=cos(a);
printf("The vaule of %d is: %0.4f",angel,b);
}
//printf("The vaule of %d is: %f",angel,b);
}
#include<stdio.h>
#include<math.h>
#define pi 3.1416
#define MAX 180
void main()
{
int angel;
float a=0.0,b=0.0;
printf("Enter the value of Angel: ");
scanf("%d",&angel);
if(angel<=MAX)
{
a=(pi/MAX)*angel;
b=cos(a);
printf("The vaule of %d is: %0.4f",angel,b);
}
//printf("The vaule of %d is: %f",angel,b);
}