Skip to main content

Find The Maximum Element in Array

#include<iostream>
using namespace std;
int main()
{
int n;
cout<<"Enter the no of Inputs :";
cin>>n;
int max=0;
for(int i=0;i<n;i++)
{
int item;
cin>>item;
if(item>max)
{
max=item;
}
}
cout<<"Maximum no is :"<<max;
}

Comments

Popular posts from this blog

Fear not exist in present.

FROM Pathak: Hello beautiful people! I want to share with you an experience I had during the holidays where I was once again able to use one of the Son-Rise Program strategies in a challenging situation. I was driving towards Boston, MA on the I90 with my best friend for a short get away, when a blizzard hit. The traffic started to grind to a halt and as night fell, the snow was coming down so hard and blowing all over the place, the visibility got poorer, and to add to things, my windshield washer squirter stopped working and the ice build up on my wipers was making it harder and harder to see by the second. We had still 15 miles to go until our exit and by now it was pitch black and the snow was settling so thickly that I could no longer see if I was even driving in a lane or not. After pulling on to the hard shoulder three times to clean the ice of the wipers. I had an unsettling feeling in my stomach and my best friend began to panic. There was a point where the traffic was s

Dogs smile

                    Do Dogs Smile??? In the minds of most people, the equivalent of a dog’s smiling is when he is wagging his tail. But there is actually one canine facial expression that comes close to what we mean by smiling in humans. In this expression, slightly opened jaws reveal the dog’s tongue lapping out over his front teeth. Frequently the eyes take on a teardrop shape at the same time, as if being pulled upward slightly at the outer corners. It is a casual expression that is usually seen when the dog is relaxed, playing, or interacting socially, especially with people. The moment any anxiety or stress is introduced, the dog’s mouth closes and you can no longer see the tongue.

Change your living life

Don’t live as though the world owes you something. Live as though you have something to contribute. Don’t live as though you have something to prove. Live as though you have something to give. Don’t underestimate the difference you can make in people’s lives through small acts. The impact you have on people through your interactions with them is larger than you realize. Even a few words can change a life. Take the strengths and blessings that God/Life has given you and do good things with them.