Program of Finding greater and occurrence of num in Array C++ Program

                     Program of Finding greater and Occurrence of num in Array

#include<iostream.h>
#include<string.h>
using namespace std ;
int main ()
{
cout<<"         Program of Finding greater and Occurence of num in Array"<<endl<<endl;
int a[10],b,m,c=0;
cout<<"Enter number "<<endl<<endl;

for(b=0;b<=10;b++)
{
   
cin>>a[b];   
   
}
m=a[0];
for(b=0;b<=10;b++)
{
if(a[b]>=m)
m=a[b];   
else
m=m;
   
}

for(b=0;b<=10;b++)
{
if(a[b]==m)
{
c++;   
}
}
cout<<"Your Greater num is ("<<m<<") And it occurs ("<<c<<") time"<<endl;   
   
}
                                <<<<<<<<                                          >>>>>>>>
                                       
Share on Google Plus

About Unknown

This is a short description in the author block about the author. You edit it by entering text in the "Biographical Info" field in the user admin panel.
    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment

Powered by Blogger.

Translate

 
 
.