C Program to find Square Root, Logarithmic Value and Exponential Value of Given Number


#include<stdio.h>
#include<conio.h>
#include<math.h>

int main()
{
	 float num, sq,lg, lg10, ex;
	 clrscr();
	 printf("Enter number: ");
	 scanf("%f", &num);
	 sq = sqrt(num);
	 lg = log(num);
	 lg10 = log10(num);
	 ex = exp(num);
	 printf("Square root of %0.2f is: %0.2f\n", num, sq);
	 printf("Natural log of %0.2f is: %0.2f\n", num, lg);
	 printf("Log base 10 of %0.2f is: %0.2f\n", num, lg10);
	 printf("Exponential value of %0.2f is: %0.2f\n", num, ex);
	 getch();
	 return(0);
}

Output

 

Enter number: 5 ↲
Square root of 5.00 is: 2.24
Natural log of 5.00 is: 1.61
Log base 10 of 5.00 is: 0.70
Exponential value of 5.00 is: 148.4

Leave a Reply

Your email address will not be published. Required fields are marked *

https://atozonlinesolutions.com/wp-content/uploads/2017/03/logo_white.png
https://atozonlinesolutions.com/wp-content/uploads/2017/03/logo_white.png
About
Products
Subscribe

If you wish to receive our latest news in your email box, just subscribe to our newsletter. We won’t spam you, we promise!

    Applauz

    As the pioneer of the lean startup movement, APPLAUZ has dedicated it’s time to sharing effective business strategies that help new businesses and enterpreneurs put their money to work in the right way.

    Subscribe

    If you wish to receive our latest news in your email box, just subscribe to our newsletter. We won’t spam you, we promise!

      Applauz

      As the pioneer of the lean startup movement, APPLAUZ has dedicated it’s time to sharing effective business strategies that help new businesses and enterpreneurs put their money to work in the right way.

      Copyright by BOLD THEMES. All rights reserved.