how to cheak biggest number of array in c++

programme for cheak biggest number of array in c++


#include<iostream>
using namespace std;
main()
{
cout<<"enter 10 numbers for find biggest number from 10 numbers\n";
int a[10],i;
for(i=0;i<10;i++)
cin>>a[i];
int max=0;
for(i=0;i<10;i++)
if(a[i]>max)
max=a[i];
cout<<"biggest number is\n";
cout<<max;
}

No comments:

Post a Comment

programme for armstrong number for 3 digit in java

armstrong number import java.util.Scanner; class Mittu {     public static void main(String []args)     {         Scanner s=new Sca...