Computer Science, asked by navin21112006, 6 months ago

Write a program that reads height (in cm) and weight (in kg) of candidate and determines whether candidate can be considered for a post. A candidate is eligible if he is at least 175cm tall and weight is between 50 to 80 kg

Answers

Answered by jasmine397734
2

Answer:

It is about 50 kg

80 kg short

Answered by tanisha5karthik
19

Answer:

import java.util.Scanner;

public class Selection

{

   public static void main(String args[])

   {

       double height, weight;

       Scanner sc = new Scanner (System.in);

       System.out.println("Enter the height of the candidate in cms");

       height = sc.nextDouble();

       System.out.println("Enter the weight of the candidate in kgs");

       weight = sc.nextDouble();

       if(height>=175)

       {

           if(weight>=50 && weight<=80)

           {

               System.out.println("Candidate is fit, can be considered for selection");

           }

           else

           {

               System.out.println("Inappropriate weight, cannot be considered for selection");

           }

       }

       else

       {

           System.out.println("Candidate is not tall enough for the selection");

       }

   }

}

Similar questions