#include<iostream.h>
#include<conio.h>
int main()
{
int a[10],j;
cout<<"Enter 10 numbers."<<endl;
for(int i=0;i<=9;i++)
cin>>a[i];
j=a[0];
for(i=0i<=9;i++)
{
if(j<a[i])
j=a[i];
}
cout<<"Largest number is "<<j<<endl;
return 0;
}
program to find maximum of two numbers using pointers
write an assembly language program to find sum of N numbers
VBnet program to find the prime numbers between 100 to 200?
To find the largest of three numbers, first find the largest of two numbers: int max (int x, int y) { return x<y?y:x; } Now you can use this one function to find the largest of three numbers: int max (int x, int y, int z) { return max (max (x, y), z); }
k
int i, largest=0;do { scanf ("Enter a number (0 to exit): %d", i); if (i>largest) largest=i; } while (i!=0); printf ("Largest number is: %d\n", largest);
Find the largest of two, then find the largest of that value and the third value. int* max (int* a, int* b) { return (a*) > (b*) ? a : b; } int* max_of_three (int* a, int* b, int* c) { return max (max (a, b), c); }
Write your own prime number program and find out.
i need this answer
Please visit http://talentsealed.blogspot.com/2009/10/to-find-sqaure-of-numbers-using-c.htmlfor the answer.
Since there is an infinite set of prime numbers the answer would be infinity.
List the factors of each of the numbers in the set. Write down the numbers that appear on all the lists. Choose the largest one.