#include <iostream>
using namespace std;
int main()
{
int size,i;
int arrayname[size];
cout<<"Enter The number Of values."<<endl;
cin>>arrayname[size];
cout<<"Enter The Values : "<<endl;
for(i=0 ; i<size ; i++)
{
cin>>arrayname[i];
}
int max=arrayname[0];
for(i=0 ; i<size ; i++){
if(max<arrayname[i]){
max=arrayname[i];}
}
cout << "Maximum Number is : " <<max<< endl;
return 0;
}
using namespace std;
int main()
{
int size,i;
int arrayname[size];
cout<<"Enter The number Of values."<<endl;
cin>>arrayname[size];
cout<<"Enter The Values : "<<endl;
for(i=0 ; i<size ; i++)
{
cin>>arrayname[i];
}
int max=arrayname[0];
for(i=0 ; i<size ; i++){
if(max<arrayname[i]){
max=arrayname[i];}
}
cout << "Maximum Number is : " <<max<< endl;
return 0;
}
No comments:
Post a Comment