Mathematical():- एक Program में Simple Numerical Calculation करने के लिए Mathematical () Use किये जाते है, जिसके लिए Program में Header File "math.h " Use की जाती है, ये Functions निम्न है !
(1) abs (number) :- यह Function किसी भी Negative या Positive value को Positive Value में Convert कर देता है !
जैसे - abs(-7)
output = 7
(2)pow (base, exponent) :- यह किसी भी नंबर की Power Value Provide करता है !
Syntax - pow (base,exponent)
Example - pow(3,3)
output=27
(3) sqrt () :- यह Function किसी Number का Square Root देता है !
Syntax - sqrt(number)
Example - sqrt(4)
output= 2
EXAMPLE
#include<stdio.h>
#include<conio.h>
#include<math.h>
void main()
{
int a,b,c,d,e,f,g,h;
clrscr();
printf("ENTER THE FIRST NUMBER");
scanf("%d",&a);
printf("ENTER THE SECOND NUMBER");
scanf("%d",&b);
c=pow(a,b);
printf("Result is = %d",c);
printf("\n");
f=abs(e);
printf("Absolute Value = %d",f);
printf("\n");
printf("ENTER THE VALUE");
scanf("%d",&g);
n=sqrt(g);
printf("Square Root = %d",h);
getche();
}
More:-
(12)MICR Full Form क्या होता है ? MICR क्या होता है ?
कोई टिप्पणी नहीं:
एक टिप्पणी भेजें