69 799
Assignments Done
Successfully Done
In February 2019

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
#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!


No comments. Be first!

Leave a comment

Ask Your question

Privacy policy Terms and Conditions