IBM HACKERRANK CODING SOLUTIONS
Відкрити в Telegram
We provide help for all Exams... Anyone can contact me @AK_Coder for Exam clearance and interviews Trusted ✅
Показати більшеКраїна не вказанаКатегорія не вказана
4 420
Підписники
Немає даних24 години
Немає даних7 днів
Немає даних30 днів
Архів дописів
🚨TCS off campus 🚨
🟢100% assurance for clearance TCS Exam
🟢We will help you till interview process guaranteed💯
✨numerical ability 26
✨Verbal 24
✨Reasoning 30
✨Test of knowledge 10
✨Code 2
🟢Whole exam help will be done here in premium group
We don't make fake promises
We give our 💯% to clear your exam 🤩✅
Those having upcoming TCS DRC on 8th April join premium group now contact : @bulliea
import java.util.Scanner;
public class Music {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner sc = new Scanner(System.in);
int n = 4;
Singer d[] = new Singer[n];
for (int i = 0; i < d.length; i++) {
int compid = sc.nextInt();
sc.nextLine();
String name = sc.nextLine();
int couempcountnt = sc.nextInt();
sc.nextLine();
double anulatrunover = sc.nextDouble();
sc.nextLine();
d[i] = new Singer(compid, name, couempcountnt, anulatrunover);
}
double fs1 = sc.nextDouble();
sc.nextLine();
int fs2 = sc.nextInt();
int sum = 0;
for (int i = 0; i < d.length; i++) {
if (d[i].getAnulatrunover() > fs1) {
sum += d[i].getEmpcount();
}
}
if (sum != 0) {
System.out.println(sum);
} else {
System.out.println("no such Singer found");
}
Singer temp = null;
for (int i = 0; i < d.length; i++) {
for (int j = i + 1; j < d.length; j++) {
if (d[i].getAnulatrunover() > d[j].getAnulatrunover()) {
temp = d[i];
d[i] = d[j];
d[j] = temp;
}
}
}
int bc=0;
// for (int i = 0; i < d.length-1; i++) {
// if (d[i].getCompid() == 101) {
// System.out.println(d[2].getName());
// System.out.println( d[2].getAnulatrunover());
// bc++;
// }
// }
if(bc==0)
System.out.println("no such Singer exists");
}
}
class Singer {
private int compid;
private String name;
private int empcount;
private double anulatrunover;
public Singer(int compid, String name, int empcount, double anulatrunover) {
super();
this.compid = compid;
this.name = name;
this.empcount = empcount;
this.anulatrunover = anulatrunover;
}
//telegram blackhatcoding
public int getCompid() {
return compid;
}
public void setCompid(int compid) {
this.compid = compid;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public int getEmpcount() {
return empcount;
}
public void setEmpcount(int empcount) {
this.empcount = empcount;
}
//blackhatcoding
public double getAnulatrunover() {
return anulatrunover;
}
public void setAnulatrunover(double anulatrunover) {
this.anulatrunover = anulatrunover;
}
}
@bulliea
JAVA IRA Code
@all_exam_help
