64 665
Assignments Done
99,2%
Successfully Done
In September 2018

Answer to Question #57832 in C++ for Ali hassan

Question #57832
write a program that inputs a series of 20 number and displays the minimum value
Expert's answer
Answer on Question#57832 — Programming | C++

#include <iostream>
using namespace std;

const int size = 20;

int main() {
int a[size];
int min;
for(int i = 0; i < size; i++) {
cin >> a[i];
}
min = a[0];
for(int i = 1; i < size; i++) {
if(a[i] < min) {
min = a[i];
}
}
cout << min;

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions