Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

Java program to find which department has highest placement program

import java.util.Scanner;public class Main{public static void main (String[] args){Scanner sc=new Scanner(System.in);System.out.println("Enter no of students placed in Computer science");int Computerscience= sc.nextInt();System.out.println("Enter no of students placed in Electronics");int Electronics=sc.nextInt();System.out.println("Enter no of students placed in Mechanical");int Mechanical=sc.nextInt();if(Computerscience<0||Electronics<0||Mechanical<0){System.out.println("Enter the number properly");}else if(Computerscience==Electronics && Electronics==Mechanical){System.out.println("None of the department has got the highest placement");}else if(Computerscience==Electronics && Mechanical<Computerscience){System.out.println("Highest placement");System.out.println("Computer science");System.out.println("Electronics");}else if(Computerscience==Mechanical && Electronics<Mechanical){System.out.println("Highest placement");System.out.println("Computer science");System.out.println("Mechanical");}else if(Electronics==Mechanical && Computerscience<Mechanical){System.out.println("Highest placement");System.out.println("Electronics");System.out.println("Mechanical");}else if(Computerscience>Electronics&&Computerscience>Mechanical){System.out.println("Highest placement");System.out.println("Computer science");}else if(Electronics>Computerscience && Electronics>Mechanical){System.out.println("Highest placement");System.out.println("Electronics");}else if(Mechanical>Computerscience && Mechanical>Electronics){System.out.println("Highest placement");System.out.println("Mechanical");}}}
Comment

PREVIOUS NEXT
Code Example
Java :: 2.5g ethernet linux problem 
Java :: how to assign one value to 2 variable in one line in java 
Java :: java.lang.stackoverflowerror null onetomany 
Java :: android prevent screen from turning off programmatically 
Java :: java minimize all windows 
Java :: fog command minecraft 
Java :: The JCheckBox and JComboBox classes belong to which package? 
Java :: Java Insert Elements to EnumSet 
Java :: advantages of iterator in java 
Java :: java resultset.absolute 
Java :: how to check that letter is not a number and is repeating or not in a sentence in java 
Java :: governmental transparency 
Java :: Java Default Access Modifier creates error in package two by importing package one 
Java :: Display a Text Five Times 
Java :: Merging 2 sorted arrays (edge cases2) 
Java :: foreign keys in json 
Java :: decision tree drools using spring boot 
Java :: for each loop summation 
Java :: Sample TreeMap 
Java :: java 11 read file line by line 
Java :: boxing and unboxing in java pdf 
Java :: find largest number in 2d array java 
Java :: webview send to console android 
Java :: how to have multiple extensions in one filter java 
Java :: how to get listview data, TextView 
Java :: java @documented 
Java :: set background drawable programmatically android 
Java :: You may test the newly compiled and packaged JAR in maven 
Java :: Java Private Access Modifier Error when we call it 
Java :: Encrypt words facebook 
ADD CONTENT
Topic
Content
Source link
Name
5+8 =