Computer Science, asked by sandhyakhot8554, 19 hours ago

Write a program to find the minimum number in a list of given N integers.
Input format
First line contain number of integer N.
Second line contains Nnumbers separated by single space.
Output format
Print the minimum number in the N given integers.
Input Constraints
1<N<10
I sai < 100
Sample input 1
Copy
Sample output 1
3
1
5 1 4​

Answers

Answered by michaelgari032
17

In C++:

#include <bits/stdc++.h>

using namespace std;

int main()

{

int n;cin>>n;

int arr[n];

//Inputing the Values into the arrays

for(int i = 0;i<n;i++)

{

cin>>arr[i];

}

//using the library function called min( )

int res = arr[0];

for(int i = 1;i < n;i++)

{

res = min(res,arr[i]);

}

cout<<res<<endl;

}

Note:

It generate the minimum number from a list of numbers

Answered by prajwalpawar31
0

Answer:

print answer at once time give answer

Similar questions