The number of function is Geometry
program to find maximum of two numbers using pointers
C:#includeint main(){int num,sum,avg=0,i;printf("enter a number");scanf("%d",&num);for(i=0;i
int sum(n) { if (n==0) return 0; else return n+sum(n-1); }
'*** PROGRAM: Compare 2 numbers using both min/max functions; ' then, output which number is max/and, which is min. '*** declare variables... min = 0 max = 0 number1 = 342 number2 = 256 '*** main program... CLS '...(CL)ear the Output (S)creen PRINT "Minimum = "; findMin(number1, number2) PRINT "Maximum = "; findMax(number1, number2) END '...END of program/halt program code execution FUNCTION findMax (num1, num2) answer = 0 IF num1 > num2 THEN answer = num1 ELSE answer = num2 findMax = answer END FUNCTION FUNCTION findMin (num1, num2) answer = 0 IF num1 < num2 THEN answer = num1 ELSE answer = num2 findMin = answer END FUNCTION ---program output... Minimum: 256 Maximum: 342
Math.sqrt(number) function is used to find the square root of a number.. try it
There will be a function in it like this: double RectangleArea (double a, double b) { return a*b; }
If it contains a decimal point or an exponential part, then it should be handled as a float (or double).You can determine an existing variable's type in C using the type() function
It will find a number - if the number is not a formula. For example - if you search for the number 30 it will find it - BUT - if the product in a cell is the result of a formula it will disregard it.
Write a C program called MonthDays to find the number of days in a given month Test your code with different input values to demonstrate that your function is robust?
template<class T> T& max(const T& x, const T&y){return(x>y?x:y); }
The number of function is Geometry
Here is an example program: class obj{ public: float p,n,r,si; friend void calc( obj temp); }; void calc( obj temp){ si = (p*n*r)/100; } The initialization and function calling is essential.
program to find maximum of two numbers using pointers
Yes there are agent functions that can not be implemented e.g. an agent can not find the largest prime number.
//C program to find the factorial of a given number using functions #include<stdio.h> #include<conio.h> int fact(int); void main() { int f,t; clrscr(); printf("\nEnter any number:"); scanf("%d",&f); t=fact(f); printf("1=%d",t); getch(); } int fact(int fa) { int i,fac=1,t; for(i=fa;i>=2;i--) { // TO print the series printf("%dx",i); fac=i*fac; } return fac; }
You're supposed to do your homework yourself. (Mind you, you have to hav at least one function called main.)