68 363
Assignments Done
98,7%
Successfully Done
In November 2018

Answer to Question #42791 in C for chernet merkneh

Question #42791
write an algorithm to find the smallest number from ten numbers
Expert's answer
#include <stdio.h>
int main() {
int array[10];
int min = 0;
printf("Please input 10 integers\n");
scanf("%d", &array[0]);
 min = array[0] ;
for ( int i = 1; i < 10; i++ ) {
  scanf("%d", &array[i]);
  if ( array[i] < min ) {
min = array[i];
  }
}
printf("Here is our minimum %d\n", 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