Input 10 numbers, and display smallest number
#include <iostream>
#define INT_MAX 2147483647
using namespace std;
int main()
{
int smallest = INT_MAX;
int temp;
for(int i = 0; i<10; i++){
cin>>temp;
if(temp<smallest)
smallest = temp;
}
cout<<smallest;
return 0;
}
Comments
Leave a comment