fork(1) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int n,m;
  6. int num,minimum;
  7. cout<<"please enter the number of digits that you want to enter:\n";
  8. cin>>m;
  9. cout<< "please enter a number:\n";
  10. cin>>num;
  11. minimum=num;
  12. for(n=1;n>m;n++)
  13. {
  14. cout<<"pleas enter a number :\n";
  15. cin>>num;
  16. if(minimum<=num)
  17. minimum=num;
  18. }
  19. cout<<"The minimum is:"<<minimum<<endl;
  20. }
  21.  
  22.  
Success #stdin #stdout 0.01s 5280KB
stdin
5 7 6 8 9 6 
stdout
please enter the number of digits that you want to enter:
please enter a number:
The minimum is:7