#include<stdio.h>
#include<conio.h>
void main()
{
int a,b;
clrscr();
printf("Enter two numbers");
scanf("%d,%d",&a,&b);
if(a>b)
{
printf("%d is greater",a);
}
else
{
printf("%d is greater",b);
}
getch();
}
Just write a method or function that calculates the LCM for two numbers at a time. Then calculate the LCM for the first two numbers, get the LCM of the result with the third number, etc.Just write a method or function that calculates the LCM for two numbers at a time. Then calculate the LCM for the first two numbers, get the LCM of the result with the third number, etc.Just write a method or function that calculates the LCM for two numbers at a time. Then calculate the LCM for the first two numbers, get the LCM of the result with the third number, etc.Just write a method or function that calculates the LCM for two numbers at a time. Then calculate the LCM for the first two numbers, get the LCM of the result with the third number, etc.
bool isBigger (float a, float b) { return a > b;}
maxValue = function (array) {mxm = array[0];for (i=0; i<array.length; i++) {if (array[i]>mxm) {mxm = array[i];}}return mxm;}; i don't know
Use a lookup table. The first two elements are 0 and 1 and each subsequent element is the sum of the preceding two elements. The table needn't be very large as there are only 43 Fibonacci numbers in the range 0 to 1 billion. If you need larger numbers, use long doubles.
To find the largest of three numbers you must first find the largest of two numbers: int max (int a, int b) { return a>b?a:b; // or, equivalently: if (a>b) return a; else return b; } Now we can use this function to find the maximum of three: int max3 (int a, int b, int c) { return max (max (a,b), c); }
program to find maximum of two numbers using pointers
Two of them
the two numbers can only be 24 and24
If the two numbers are x and y, thenthe square of the two numbers is one => (xy)^2 = 1 which implies that xy = +/-1.Then xy is a maximum => xy = 1.
272 is the maximum possible.
find two positive numbers whose product is a maximum. 1.) the sum is s.
2,226. this is the way to write two thousand, two hundred and twenty six in numbers.
There are [countably] infinite rational number between any two rational numbers. There is, therefore, no maximum.
3844
529.
Assuming the two numbers must be positive whole numbers, the answer is 1 and 11. If they need to be non-negative, it is 0 and 12. If negative numbers are permitted (eg -1 and 13) there is no limit to the sum - ie there is no maximum.
Then you write down both numbers