Tuesday, 15 November 2016

Write a program that inputs a series of 20 numbers and display minimum value.


Write a C++ program that  inputs a series of 20 numbers and display minimum value.

Solution : 

 
 #include <iostream.h>
   #include <conio.h> 

int main () 
       {
           int Min; 
           int Counter; 
           int value;

           cout<< "Enter the number: " ; 
           cin>> Min;

           for (Counter = 0; Counter 19; Counter++)
           {
                    cout<<"Enter a Number; "; 
                    cin>> value; 
                    i(value < Min)
                    Min = value; 
           }
           cout<<"Minimum value is : " <<Min <<endl; 
           getch();  
           return 0;
   }  


5 comments:

  1. why you have used counter value?

    ReplyDelete
  2. our professor says this program is not right and is proxy

    ReplyDelete
  3. can u please write this program to switch statement?

    ReplyDelete

If you have any doubt please let me know

Methods in JAVA Language

 In general, a way may be thanks to perform some task. Similarly, the tactic in Java may be a collection of instructions that performs a sel...