import java.util.Scanner;
public class NegativeSum {
public static void main(String[] args) {
int[] numbers = {2, -3, -14, 7};
int negativeSum = findNegativeSum(numbers);
}
public static int findNegativeSum(int[] arr) {
int sum = 0;
for (int num : arr) {
if (num < 0) {
sum += num;
}
}
return sum;
}
}
Wipro exam ans
19/1/2025
Java
@itjobsservices
public class NegativeSum {
public static void main(String[] args) {
int[] numbers = {2, -3, -14, 7};
int negativeSum = findNegativeSum(numbers);
}
public static int findNegativeSum(int[] arr) {
int sum = 0;
for (int num : arr) {
if (num < 0) {
sum += num;
}
}
return sum;
}
}
Wipro exam ans
19/1/2025
Java
@itjobsservices
👍7❤1
import java.util.Scanner;
public class MidIndexProblem {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
// Read the number of elements
System.out.println("Enter the number of elements:");
int n = scanner.nextInt();
// Read the array elements
int[] arr = new int[n];
System.out.println("Enter the elements:");
for (int i = 0; i < n; i++) {
arr[i] = scanner.nextInt();
}
// Find the mid-index
int midIndex = n / 2;
// Output the middle element
System.out.println("Middle element: " + arr[midIndex]);
scanner.close();
}
}
wipro
19/1/25
2. ans , mid-index problem
Java
@itjobsservices
public class MidIndexProblem {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
// Read the number of elements
System.out.println("Enter the number of elements:");
int n = scanner.nextInt();
// Read the array elements
int[] arr = new int[n];
System.out.println("Enter the elements:");
for (int i = 0; i < n; i++) {
arr[i] = scanner.nextInt();
}
// Find the mid-index
int midIndex = n / 2;
// Output the middle element
System.out.println("Middle element: " + arr[midIndex]);
scanner.close();
}
}
wipro
19/1/25
2. ans , mid-index problem
Java
@itjobsservices
👍3
import java.util.Scanner;
public class RotateNumberArray {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
// Input the number
System.out.println("Enter the number:");
String input = scanner.next();
int n = input.length();
// Convert the number into an array of digits
int[] arr = new int[n];
for (int i = 0; i < n; i++) {
arr[i] = Character.getNumericValue(input.charAt(i));
}
// Input the number of rotations
System.out.println("Enter the number of rotations:");
int rotations = scanner.nextInt();
// Perform the rotation
int[] rotatedArray = rotateArray(arr, rotations);
// Print the rotated array as a number
System.out.println("Rotated Number:");
for (int digit : rotatedArray) {
System.out.print(digit);
}
scanner.close();
}
public static int[] rotateArray(int[] arr, int rotations) {
int n = arr.length;
// Normalize the rotations
rotations = rotations % n;
// Create a new array to hold the rotated result
int[] result = new int[n];
// Copy the last 'rotations' elements to the beginning
for (int i = 0; i < rotations; i++) {
result[i] = arr[n - rotations + i];
}
// Copy the remaining elements
for (int i = rotations; i < n; i++) {
result[i] = arr[i - rotations];
}
return result;
}
}
Sample input
123456
2
Sample Output
561234
Java
19/1/25
Wipro exam
public class RotateNumberArray {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
// Input the number
System.out.println("Enter the number:");
String input = scanner.next();
int n = input.length();
// Convert the number into an array of digits
int[] arr = new int[n];
for (int i = 0; i < n; i++) {
arr[i] = Character.getNumericValue(input.charAt(i));
}
// Input the number of rotations
System.out.println("Enter the number of rotations:");
int rotations = scanner.nextInt();
// Perform the rotation
int[] rotatedArray = rotateArray(arr, rotations);
// Print the rotated array as a number
System.out.println("Rotated Number:");
for (int digit : rotatedArray) {
System.out.print(digit);
}
scanner.close();
}
public static int[] rotateArray(int[] arr, int rotations) {
int n = arr.length;
// Normalize the rotations
rotations = rotations % n;
// Create a new array to hold the rotated result
int[] result = new int[n];
// Copy the last 'rotations' elements to the beginning
for (int i = 0; i < rotations; i++) {
result[i] = arr[n - rotations + i];
}
// Copy the remaining elements
for (int i = rotations; i < n; i++) {
result[i] = arr[i - rotations];
}
return result;
}
}
Sample input
123456
2
Sample Output
561234
Java
19/1/25
Wipro exam
👍3
import java.util.Scanner;
public class TwoSum {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
// Input the array size
System.out.println("Enter the size of the array:");
int size = scanner.nextInt();
// Input the array elements
int[] arr = new int[size];
System.out.println("Enter the array elements:");
for (int i = 0; i < size; i++) {
arr[i] = scanner.nextInt();
}
// Input the target value
System.out.println("Enter the target value:");
int target = scanner.nextInt();
int maxSum=0;
for (int i = 0; i < size; i++) {
int wind=0;
for (int j = i; j < size; j++) {
wind += arr[i+j];
maxSum=Math.max(maxSum,wind);
}
scanner.close();
}
}
public class TwoSum {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
// Input the array size
System.out.println("Enter the size of the array:");
int size = scanner.nextInt();
// Input the array elements
int[] arr = new int[size];
System.out.println("Enter the array elements:");
for (int i = 0; i < size; i++) {
arr[i] = scanner.nextInt();
}
// Input the target value
System.out.println("Enter the target value:");
int target = scanner.nextInt();
int maxSum=0;
for (int i = 0; i < size; i++) {
int wind=0;
for (int j = i; j < size; j++) {
wind += arr[i+j];
maxSum=Math.max(maxSum,wind);
}
scanner.close();
}
}
❤2👍2
// Online Java Compiler
// Use this editor to write, compile and run your Java code online
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
// Input the array size
System.out.println("Enter the size of the array:");
int size = scanner.nextInt();
// Input the array elements
int[] arr = new int[size];
System.out.println("Enter the array elements:");
for (int i = 0; i < size; i++) {
arr[i] = scanner.nextInt();
}
// Input the target value
System.out.println("Enter the target value:");
int target = scanner.nextInt();
int maxSum=0;
boolean flag=false;
for (int i = 0; i < size; i++) {
int wind=0;
for (int j = i+1; j < 2; j++) {
if(arr[i]+arr[j]==15){
flag=true;
break;
}
}
}
System.out.println(true);
scanner.close();
}
}
// Use this editor to write, compile and run your Java code online
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
// Input the array size
System.out.println("Enter the size of the array:");
int size = scanner.nextInt();
// Input the array elements
int[] arr = new int[size];
System.out.println("Enter the array elements:");
for (int i = 0; i < size; i++) {
arr[i] = scanner.nextInt();
}
// Input the target value
System.out.println("Enter the target value:");
int target = scanner.nextInt();
int maxSum=0;
boolean flag=false;
for (int i = 0; i < size; i++) {
int wind=0;
for (int j = i+1; j < 2; j++) {
if(arr[i]+arr[j]==15){
flag=true;
break;
}
}
}
System.out.println(true);
scanner.close();
}
}
👍4
if you want to promotion.
Like a Instagram account, telegram channels, YouTube channel...
➡ @Priya_i
Like a Instagram account, telegram channels, YouTube channel...
➡ @Priya_i
📌IT learning courses
📌All programing courses
📌Abdul bari courses
📌Ashok IT
📌Linux
📌Networking
📌Design patterns
📌Donet
📌Docker
📌Entity framework
📌Node.js
📌ASP. Net
📌Aps. Net cro
📌java
📌JavaScript
📌full stack developer
Tutorials + Books + Courses + Trainings + Workshops + Educational Resources
🔹Data science
🔹Python
🔹Artificial Intelligence
🔹AWS Certified
🔹Cloud
🔹BIG DATA
🔹Data Analytics
🔹BI
🔹Google Cloud Platform
🔹IT Training
🔹MBA
🔹Machine Learning
🔹Deep Learning
🔹Ethical Hacking
🔹SPSS
🔹Statistics
🔹Data Base
🔹Learning language resources English , 🇫🇷
𝐂𝐘𝐁𝐄𝐑 𝐒𝐄𝐂𝐔𝐑𝐈𝐓𝐘 𝐀𝐋𝐋 𝐂𝐎𝐔𝐑𝐒𝐄
⚡️ Reconnaissance and Footprinting
⚡️ Network Scanning
⚡️ Enumeration
⚡️ Firewalls HIDs Honeypot
⚡️ Malware and Threats
⚡️ Mobile Platform
⚡️ Pentesting
⚡️ Sql Injection
⚡️ System Hacking
⚡️ Web Application
⚡️ Wireless Network
⚡️ Cloud Computing
⚡️ Web Server
⚡️ Social Engineering
⚡️ Session Hijacking
⚡️ Sniffing
⚡️ BufferOverflow
⚡️ Cryptography
⚡️ Denial Of Service
All courses (70 rupees)
Lifetime access
Contact:- @meterials_available
📌All programing courses
📌Abdul bari courses
📌Ashok IT
📌Linux
📌Networking
📌Design patterns
📌Donet
📌Docker
📌Entity framework
📌Node.js
📌ASP. Net
📌Aps. Net cro
📌java
📌JavaScript
📌full stack developer
Tutorials + Books + Courses + Trainings + Workshops + Educational Resources
🔹Data science
🔹Python
🔹Artificial Intelligence
🔹AWS Certified
🔹Cloud
🔹BIG DATA
🔹Data Analytics
🔹BI
🔹Google Cloud Platform
🔹IT Training
🔹MBA
🔹Machine Learning
🔹Deep Learning
🔹Ethical Hacking
🔹SPSS
🔹Statistics
🔹Data Base
🔹Learning language resources English , 🇫🇷
𝐂𝐘𝐁𝐄𝐑 𝐒𝐄𝐂𝐔𝐑𝐈𝐓𝐘 𝐀𝐋𝐋 𝐂𝐎𝐔𝐑𝐒𝐄
⚡️ Reconnaissance and Footprinting
⚡️ Network Scanning
⚡️ Enumeration
⚡️ Firewalls HIDs Honeypot
⚡️ Malware and Threats
⚡️ Mobile Platform
⚡️ Pentesting
⚡️ Sql Injection
⚡️ System Hacking
⚡️ Web Application
⚡️ Wireless Network
⚡️ Cloud Computing
⚡️ Web Server
⚡️ Social Engineering
⚡️ Session Hijacking
⚡️ Sniffing
⚡️ BufferOverflow
⚡️ Cryptography
⚡️ Denial Of Service
All courses (70 rupees)
Lifetime access
Contact:- @meterials_available
👍9❤1
▶ACCENTURE HIRING IS BACK
Batch upto 2024
Accenture Sending Exam Shortlisting Mails
Role : Packaged App Development Associate (PADA)
▪️ Qualification: B.E/B.Tech/M.E/M.Tech, MCA, and M.Sc
▪️ Batch : 2021/2022/2023 & 2024
Apply Link For (PADA)
http://www.itjobs.services
➖➖➖➖➖➖➖➖➖➖➖➖➖
Role: System and Application Services Associate (SASA)
▪️ Qualification: B.Sc., BCA, BBA, B.A, B.Com
▪️ Batch : 2021/2022/2023 & 2024
Apply Link For (SASA)
http://www.itjobs.services
MUST Apply
Batch upto 2024
Accenture Sending Exam Shortlisting Mails
Role : Packaged App Development Associate (PADA)
▪️ Qualification: B.E/B.Tech/M.E/M.Tech, MCA, and M.Sc
▪️ Batch : 2021/2022/2023 & 2024
Apply Link For (PADA)
http://www.itjobs.services
➖➖➖➖➖➖➖➖➖➖➖➖➖
Role: System and Application Services Associate (SASA)
▪️ Qualification: B.Sc., BCA, BBA, B.A, B.Com
▪️ Batch : 2021/2022/2023 & 2024
Apply Link For (SASA)
http://www.itjobs.services
MUST Apply
👍5
🎯Salesforce hiring for Interns
Office - Flexible
locations:- India - Hyderabad
time type:- Full time
End Date: January 25, 2025 (1 day left to apply)
job requisition id:- JR280041
Apply Link : www.itjobs.services
Office - Flexible
locations:- India - Hyderabad
time type:- Full time
End Date: January 25, 2025 (1 day left to apply)
job requisition id:- JR280041
Apply Link : www.itjobs.services
👍1