TODAY JAVA SCHOOL

In java school, programming, design, computer general knowledge, web application, software, web services, social media, digital marketing, oops, concept of programming language, oops feature, console media, graphics medium, first programming, c, c ++ , Java, PHP, SQL, MySQL, HTML, HTML_5, J_query, JavaScript, Bootstrap, Framework, images with logos, examples, shared and explained.

https://www.amazon.in/b?node=26373545031&linkCode=ll2&tag=1234567801cdb-21&linkId=3b9882431b00409b44141e0344b35a15&language=en_IN&ref_=as_li_ss_tl

Breaking

Monday, 11 May 2020

Arithmetical Library Function In C Language | Arithmetical Library Function In C Language In Hindi

Arithmetical Library Function In C


C function where are used to perform mathematical   operations program are called arithmetical function.  This library are inbuilt in arithmetical function in c language.


“math.h” and “stdlib.h” header files support all the arithmetical function in c language.

List of arithmetical function given below:


1.pow()
2.sin()
3.sqrt()
4.log()

download  image arithmetical library function in c language

Fig: arithmetical library in c 


1.pow()

This is used to find power of given number.

Program

#include<stdio.h>
#include<conio.h>
#include<math.h>
void main()
{
int     i,n,j;
printf(“Input two number”);
scanf(“%d %d%d”, &I,&j,&n);
n=pow(I,j);
printf(n);
getch();
}


Output:

Input two value
5
3
125


2.sin()

This function is used to calculate  sine value.


Program

#include<stdio.h>
#include<conio.h>
#include<math.h>
void main()
{
int     i,n;
printf(“Input  number”);
scanf(“%d %d%d”, &I);
n=pow(I);
printf(n);
getch();
}

Output:

Input  value
90
0

3.sqrt()

This f unction is used to find the square root of the argument  passed to  this function.

Program

#include<stdio.h>
#include<conio.h>
#include<math.h>
void main()
{
int     i,n;
printf(“Input  number”);
scanf(“%d %d%d”, &I);
n=sqrt(I);
printf(n);
getch();
}

Output:

Input  value
25
5

4.log()

This function is used to calculate  the natural logarithm.

Program

#include<stdio.h>
#include<conio.h>
#include<math.h>
void main()
{
double  n,x;
x=72.325;
n=log(x);
printf(n);
printf(x);
getch();
}

Ouput:

72.325
4.28117

No comments:

Post a Comment