Computer Science, asked by ankitap1ganguly, 8 months ago

Write A Program to input three numbers(a,b,c) and print“good”ifa and b is greater than c,print“very good”if b and c is greater than a,print“excellent”if a and c is greater than b.​

Answers

Answered by CoderRishav
1

Answer:

program in python -

a = int(input("Enter a - "))

b = int(input("Enter b - "))

c = int(input("Enter c - "))

if ( c < a and c < b) :

print("good")

elif ( a < b and a < c) :

print("very good")

elif ( b < a and b < c) :

print("excellent")

program in Java -

import java.util.*;

class c

{

public static void main ()

{

Scanner in = new Scanner(System.in);

System.out.println("Enter a -");

int a = in.nextInt();

System.out.println("Enter b -");

int b = in.nextInt();

System.out.println("Enter c -");

int c = in.nextInt();

if ( c < a && c < b)

System.out.println("Good");

else if(a < b && a < c)

System.out.println("Very Good");

else if( b < a && b < c)

System.out.println("Excellent");

}

}

Explanation:

In the question it is written that the if a and b is greater than c then print good, In easy way it means if c is smallest. same in all.

please mark as brainlist and give vote by click heart :)

Similar questions