Computer Science, asked by thanmayibalu7584, 1 year ago

Write a program to input ‘n’ employees’ salary and find minimum & maximum salary among ‘n’ employees.

Answers

Answered by computersengineers43
2

Answer:

Explanation:

t=tuple( )  

n=input(“Enter total number of employees”)  

for i in range(n):  

a=input(“enter salary of employee:”)  

t=t+(a,)

print “maximum salary=”,max(t)  

print “minimum salary=”,min(t)

Answered by PoojaBurra
3

The program for finding minimum and maximum salary among n employes is given below

  • Execute the code given below and the required output would be obtained
  •  t=tuple( )  
  • n=input(“Enter total number of employees”)  
  • for i in range(n):

       a=input(“enter salary of employee:”)

       t=t+(a),

  • print “maximum salary=”,max(t)  
  • print “minimum salary=”,min(t)
  • Below there is an example how this program works
  • Output : Enter total number of employees 3

         enter salary of employee: 25000

         enter salary of employee: 20000

         enter salary of employee: 36000

  • maximum salary =  36000
  • minimum salary = 20000
  • By using the above program we could find the maximum and minimum salary of employes.

Similar questions