Java Unix car management Code ✅
TCS IRA exam
@Allcodingsolution
@Allcodingsolution
@Allcodingsolution
@Allcodingsolution
@Allcodingsolution
TCS IRA exam
@Allcodingsolution
@Allcodingsolution
@Allcodingsolution
@Allcodingsolution
@Allcodingsolution
C++ language
All test case passed
1st question
✅✅✅✅
TCS Exam
@Allcodingsolution
@Allcodingsolution
@Allcodingsolution
@Allcodingsolution
@Allcodingsolution
All test case passed
1st question
✅✅✅✅
TCS Exam
@Allcodingsolution
@Allcodingsolution
@Allcodingsolution
@Allcodingsolution
@Allcodingsolution
C++ language
All test case passed
2nd question
✅✅✅✅
TCS Exam
@Allcodingsolution
@Allcodingsolution
@Allcodingsolution
@Allcodingsolution
@Allcodingsolution
All test case passed
2nd question
✅✅✅✅
TCS Exam
@Allcodingsolution
@Allcodingsolution
@Allcodingsolution
@Allcodingsolution
@Allcodingsolution
👍1
import java.util.Scanner;
public class Solution {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner sc = new Scanner(System.in);
int n = 4;
Music codewithvirus[] = new Music[n];
for (int i = 0; i < codewithvirus.length; i++) {
int no = sc.nextInt();
sc.nextLine();
String type = sc.nextLine();
int count = sc.nextInt();
sc.nextLine();
double duration = sc.nextDouble();
sc.nextLine();
codewithvirus[i] = new Music(no, type, count, duration);
}
int count1 = sc.nextInt();
sc.nextLine();
double duration1 = sc.nextDouble();
int ans = codewithvirus1(codewithvirus, count1);
if (ans != 0) {
System.out.println(ans);
} else {
System.out.println("No playlist found.");
}
Music temp = null;
for (int i = 0; i < codewithvirus.length; i++) {
for (int j = i + 1; j < codewithvirus.length; j++) {
if (codewithvirus[i].getCount() > codewithvirus[j].getCount()) {
temp = codewithvirus[i];
codewithvirus[i] = codewithvirus[j];
codewithvirus[j] = temp;
}
}
}
int snd = 0;
for (int i = 0; i < codewithvirus.length; i++) {
if (codewithvirus[i].getDuration() > duration1) {
snd++;
System.out.println(codewithvirus[i].getType());
}
}
if (snd == 0) {
System.out.println("No playlist found with mentioned attribute.");
}
}
public static int codewithvirus1(Music[] d, int s) {
int ave = 0;
int n = 0, c = 0;
for (int i = 0; i < d.length; i++) {
if (d[i].getCount() > s) {
c += d[i].getCount();
n++;
}
}
try
{
ave = c / n;
return ave;
}
catch(ArithmeticException e)
{
return 0;
}
}
}
class Music {
private int no;
private String type;
private int count;
private double duration;
public Music(int no, String type, int count, double duration) {
super();
this.no = no;
this.type = type;
this.count = count;
this.duration = duration;
}
public int getNo() {
return no;
}
public void setNo(int no) {
this.no = no;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public int getCount() {
return count;
}
public void setCount(int count) {
this.count = count;
}
public double getDuration() {
return duration;
}
public void setDuration(double duration) {
this.duration = duration;
}
}
TCS IRA exam ✅✅✅✅
@Allcodingsolution
@Allcodingsolution
@Allcodingsolution
@Allcodingsolution
@Allcodingsolution
public class Solution {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner sc = new Scanner(System.in);
int n = 4;
Music codewithvirus[] = new Music[n];
for (int i = 0; i < codewithvirus.length; i++) {
int no = sc.nextInt();
sc.nextLine();
String type = sc.nextLine();
int count = sc.nextInt();
sc.nextLine();
double duration = sc.nextDouble();
sc.nextLine();
codewithvirus[i] = new Music(no, type, count, duration);
}
int count1 = sc.nextInt();
sc.nextLine();
double duration1 = sc.nextDouble();
int ans = codewithvirus1(codewithvirus, count1);
if (ans != 0) {
System.out.println(ans);
} else {
System.out.println("No playlist found.");
}
Music temp = null;
for (int i = 0; i < codewithvirus.length; i++) {
for (int j = i + 1; j < codewithvirus.length; j++) {
if (codewithvirus[i].getCount() > codewithvirus[j].getCount()) {
temp = codewithvirus[i];
codewithvirus[i] = codewithvirus[j];
codewithvirus[j] = temp;
}
}
}
int snd = 0;
for (int i = 0; i < codewithvirus.length; i++) {
if (codewithvirus[i].getDuration() > duration1) {
snd++;
System.out.println(codewithvirus[i].getType());
}
}
if (snd == 0) {
System.out.println("No playlist found with mentioned attribute.");
}
}
public static int codewithvirus1(Music[] d, int s) {
int ave = 0;
int n = 0, c = 0;
for (int i = 0; i < d.length; i++) {
if (d[i].getCount() > s) {
c += d[i].getCount();
n++;
}
}
try
{
ave = c / n;
return ave;
}
catch(ArithmeticException e)
{
return 0;
}
}
}
class Music {
private int no;
private String type;
private int count;
private double duration;
public Music(int no, String type, int count, double duration) {
super();
this.no = no;
this.type = type;
this.count = count;
this.duration = duration;
}
public int getNo() {
return no;
}
public void setNo(int no) {
this.no = no;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public int getCount() {
return count;
}
public void setCount(int count) {
this.count = count;
}
public double getDuration() {
return duration;
}
public void setDuration(double duration) {
this.duration = duration;
}
}
TCS IRA exam ✅✅✅✅
@Allcodingsolution
@Allcodingsolution
@Allcodingsolution
@Allcodingsolution
@Allcodingsolution
This is today IRA Java questions solution guys
Just take a reference
Just take a reference
Done with both mcqs and sbqs in java ✅✅✅
TCS PRA exam ✅✅✅✅
@Allcodingsolution
@Allcodingsolution
@Allcodingsolution
@Allcodingsolution
@Allcodingsolution
TCS PRA exam ✅✅✅✅
@Allcodingsolution
@Allcodingsolution
@Allcodingsolution
@Allcodingsolution
@Allcodingsolution
Done with python mcq and sbqs
TCS PRA exam ✅✅✅✅
@Allcodingsolution
@Allcodingsolution
@Allcodingsolution
@Allcodingsolution
@Allcodingsolution
TCS PRA exam ✅✅✅✅
@Allcodingsolution
@Allcodingsolution
@Allcodingsolution
@Allcodingsolution
@Allcodingsolution
❤1
Hackwithinfy code✅
Python
@Allcodingsolution
@Allcodingsolution
@Allcodingsolution
@Allcodingsolution
@Allcodingsolution
Python
@Allcodingsolution
@Allcodingsolution
@Allcodingsolution
@Allcodingsolution
@Allcodingsolution
Hackwithinfy code✅
Python
@Allcodingsolution
@Allcodingsolution
@Allcodingsolution
@Allcodingsolution
@Allcodingsolution
Python
@Allcodingsolution
@Allcodingsolution
@Allcodingsolution
@Allcodingsolution
@Allcodingsolution
👍1
LDS code✅✅
Python 3
Accenture exam
@Allcodingsolution
@Allcodingsolution
@Allcodingsolution
@Allcodingsolution
@Allcodingsolution
Python 3
Accenture exam
@Allcodingsolution
@Allcodingsolution
@Allcodingsolution
@Allcodingsolution
@Allcodingsolution
Fannys Occurrences code✅✅
Python 3
Accenture exam
@Allcodingsolution
@Allcodingsolution
@Allcodingsolution
@Allcodingsolution
@Allcodingsolution
Python 3
Accenture exam
@Allcodingsolution
@Allcodingsolution
@Allcodingsolution
@Allcodingsolution
@Allcodingsolution
👍1