Computer Science, asked by sanzarhussain2003, 4 months ago

WAP to accept marks of 3 to subjects and display the highest mark​

Answers

Answered by dhruvgandhi200
0

Answer:

In python (IDLE)

Explanation:

subject1=int(input("Enter first subject marks= "))

subject2=int(input("Enter second subject marks= "))

subject3=int(input("Enter third subject marks= "))

if subject1>subject2 and subject1>subject3:

  print("Subject 1 is the greatest with",subject1,"marks")

elif subject2>subject1 and subject2>subject3:

  print("Subject 2 is the greatest with",subject2,"marks")

elif subject3>subject2 and subject3>subject1:

  print("Subject 3 is the greatest with",subject3,"marks")

else:

  print("invalid input")

Answered by abdullah060903112
0

Answer:

Subject1=int(input("Enter first subject marks= "))

subject2=int(input("Enter second subject marks= "))

subject3=int(input("Enter third subject marks= "))

if subject1>subject2 and subject1>subject3:

 print("Subject 1 is the greatest with",subject1,"marks")

elif subject2>subject1 and subject2>subject3:

 print("Subject 2 is the greatest with",subject2,"marks")

elif subject3>subject2 and subject3>subject1:

 print("Subject 3 is the greatest with",subject3,"marks")

else:

 print("invalid input")

Explanation:

Similar questions