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

Sunday 24 May 2020

C++ Arithmetical Programming Language Function | C++ Arithmetical Programming Language Function Example

C++  Arithmetical Function

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

“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()

 

 

image of C++  Arithmetical  Programming Language Function

Fig: C++  Arithmetical   Function 

1.pow()

This is used to find power of given number.


Program

#include<iostream.h>

#include<conio.h>

#include<math.h>

void main()

{

int     i,n,j;

cout<<“Input two number”;

cin>>i>>j;

n=pow(I,j);

cout<<n;

getch();

}


Output:

Input two value

5

3

125


 2.sin()

This function is used to calculate  sine value.

Program

#include<iostream.h>

#include<conio.h>

#include<math.h>

void main()

{

int     i,n;

cout<<“Input  number”;

cin>>i;

n=pow(I);

cout<<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<iostream.h>

#include<conio.h>

#include<math.h>

void main()

{

int     i,n;

cout<<“Input  number”;

cin>>i;

n=sqrt(I);

cout<<n;

getch();

}

Output:

Input  value

25

5


4.log()

This function is used to calculate  the natural logarithm.


Program

#include<iostream.h>

#include<conio.h>

#include<math.h>

void main()

{

double  n,x;

x=72.325;

n=log(x);

cout<<n;

cout<<x;

getch();

}


Ouput:

72.325

4.28117

  

 


No comments:

Post a Comment