1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Wewaii [24]
3 years ago
9

I don’t know technically

Computers and Technology
2 answers:
butalik [34]3 years ago
8 0
The answer would be d
gregori [183]3 years ago
3 0
I go to that school to and it would be d I think I'm not sure
You might be interested in
in java how do i Write a program that reads a set of integers, and then prints the sum of the even and odd integers.
hammer [34]

Answer:

Here is the JAVA program:

import java.util.Scanner; //to take input from user

public class Main{

public static void main(String[] args) { //start of main function

Scanner input = new Scanner(System.in); // creates Scanner class object  

       int num, integer, odd = 0, even = 0; //declare variables

       System.out.print("Enter the number of integers: "); //prompts user to enter number of integers

       num = input.nextInt(); //reads value of num from user

       System.out.print("Enter the integers:\n"); //prompts user to enter the integers

       for (int i = 0; i < num; i++) { //iterates through each input integer

           integer = input.nextInt(); // reads each integer value

               if (integer % 2 == 0) //if integer value is completely divisible by 2

                   even += integer; //adds even integers

               else //if integer value is not completely divisible by 2

                   odd += integer;  } //adds odd integers

           System.out.print("Sum of Even Numbers: " + even); //prints the sum of even integers

           System.out.print("\nSum of Odd Numbers: " + odd);//prints the sum of odd integers

           }}

Explanation:

The program is explained in the comments mentioned with each line of the code. I will explain the logic of the program with the help of an example.

Suppose user wants to input 5 integers. So,

num = 5

Suppose the input integers are:

1, 2 , 3, 4, 5

for (int i = 0; i < num; i++)  is a for loop that has a variable i initialized to 0. The condition i<num is true because i=0 and num=5 so 0<5. Hence the statements inside body of loop execute.

At first iteration:

integer = input.nextInt(); statement reads the value of input integer. The first integer is 1

if (integer % 2 == 0) checks if integer is completely divisible by 2. The modulo operator is used which returns the remainder of the division and if this remainder is equal to 0 then it means that the integer is completely divisible by 2 and if the integer is completely divisible by 2 then this means the integer is even. 1%2 returns 1 so this means this condition evaluates to false and the integer is not even. So the else part executes:

odd += integer;   this becomes:

odd = odd + integer

odd = 1

Now the value of i is incremented to 1 so i=1

At second iteration:

integer = input.nextInt(); statement reads the value of input integer. The first integer is 2

if (integer % 2 == 0) checks if integer is completely divisible by 2. 2%2 returns 0 so this means this condition evaluates to true and the integer is even. So

even += integer;   this becomes:

even= even+ integer

even = 2

Now the value of i is incremented to 1 so i=2

At third iteration:

integer = input.nextInt(); statement reads the value of input integer. The first integer is 3

if (integer % 2 == 0) checks if integer is completely divisible by 2. 3%2 returns 1 so this means this condition evaluates to false and the integer is odd. So

odd += integer;   this becomes:

odd= odd + integer

odd= 1 + 3

odd = 4

Now the value of i is incremented to 1 so i=3

At fourth iteration:

integer = input.nextInt(); statement reads the value of input integer. The first integer is 4

if (integer % 2 == 0) checks if integer is completely divisible by 2. 4%2 returns 0 so this means this condition evaluates to true and the integer is even. So

even+= integer;   this becomes:

even = even + integer

even = 2 + 4

even = 6

Now the value of i is incremented to 1 so i=4

At fifth iteration:

integer = input.nextInt(); statement reads the value of input integer. The first integer is 5

if (integer % 2 == 0) checks if integer is completely divisible by 2. 5%2 returns 1 so this means this condition evaluates to false and the integer is odd. So

odd+= integer;   this becomes:

odd= odd+ integer

odd= 4 + 5

odd = 9

Now the value of i is incremented to 1 so i=5

When i=5 then i<num condition evaluate to false so the loop breaks. The next two print statement prints the values of even and odd. So

even = 6

odd = 9

Hence the output is:

Sum of Even Numbers: 6                                                                                                           Sum of Odd Numbers: 9  

6 0
3 years ago
Write a function named "isValidPassword" that takes in a string and returns 1 if it stores a valid password and 0 otherwise, A v
Maslowich

Answer:

Here is code in java.

import java.util.*;

import java.lang.*;

import java.io.*;

class Solution

{

public static void main (String[] args) throws java.lang.Exception

{

   try{

   //declare and initialize string variables

       String str1="password";

       String str2="Pass_word";

    //calling function to check valid password

       System.out.println("output of password is: "+isValidPassword(str1));

        System.out.println("output of Pass_word is: "+isValidPassword(str2));

   }catch(Exception ex){

       return;}

}

// functionn to check the valid password

public  static int isValidPassword(String str)

{

// variables to count the lower,upper and non character

  int i, lower_c = 0, upper_c = 0, non_c = 0;

  char ch;

  for(i=0;i<str.length();i++)

  {

      ch = str.charAt(i);

     if(ch >= 'a' && ch <= 'z')

     {//count of lower character

        lower_c++;

     }

     else if(ch >= 'A' && ch <= 'Z')

     {

   //count of upper character

        upper_c++;

     }

     else

     {

   //count of non character

        non_c++;

     }

  }

  if(lower_c > 0 && upper_c > 0 && non_c > 0) {

     return 1;

  } else {

     return 0;

  }

}

}

Explanation:

Declare and initialize two string variables.In the isValidPassword() function, pass the string parameter and then count the lower, upper and non character in the string.If string contains call the three characters then function will return 1 otherwise it will return 0 .

Output:

output of password is: 0

output of Pass_word is: 1

8 0
3 years ago
Four ways to improve the performance of a hard disk include.
erik [133]

Answer:

Defragmenting, and optimizing, also on Windows to not use Paging unless you have an SSD. And to install a lightweight OS like Windows 11 super-lite, Linux etc.

7 0
2 years ago
What are informational sessions?
arsen [322]

Answer:B

Explanation:

7 0
3 years ago
What describes Accenture's approach to automation?
kogti [31]

human center because we describe stuff by what we see and obserevs

4 0
2 years ago
Read 2 more answers
Other questions:
  • Judy forgot where she saved a certain file on her computer. Therefor, she searches for all files with a jpg file extension. Whic
    11·2 answers
  • Which risk management framework does the organization of standardization publish
    13·1 answer
  • Write the definition of a function named quadratic that receives three double parameters a, b, c. If the value of a is 0 then th
    12·1 answer
  • Which function of a word processing program enables you to apply a preset formatting
    5·1 answer
  • SNMP is a protocol used to query hosts, servers, and devices about performance or health status data. This protocol has long bee
    7·1 answer
  • س2) اکتب خوارزميه لحل المعادلة الرياضيه الاتيه
    9·1 answer
  • Trong ửod muốn trình bày dạng cột càn thực hiện lệnh nào
    13·1 answer
  • Which terms means device that converts one voltage to another ?
    15·1 answer
  • Write a program that uses a structure to store the following data about a customer account: Name Address City, State, and ZIP Te
    10·1 answer
  • Explain why you do not need expensive equipment to take pictures or record video?
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!