63 093
Assignments Done
99,1%
Successfully Done
In July 2018

Answer to Question #69476 in C++ for James

Question #69476
C++ program using arrays that asks the user to type 10 integers and writes the smallest value.
Expert's answer
Asnwer:
#include <iostream>
using namespace std;

int main(void)
{
int array[10];

for(int i=0; i<10; i++)
{
cout << "Enter integer number: ";
cin >> array[i];
}

int smallestValue = array[0];
for(int i=1; i<10; i++)
{
if (smallestValue > array[i])
smallestValue = array[i];
}

cout << endl << "Smallest value: " << smallestValue << endl;

return 0;
}

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