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
kicyunya [14]
2 years ago
12

What is 2+2 I need to know hurry

Computers and Technology
2 answers:
Montano1993 [528]2 years ago
6 0

Answer:

I think it might be 4 I'm not 100% sure tho☠☠☠

Softa [21]2 years ago
4 0

Answer:

4

Explanation:

2 +2=4

because two 2's make four like two 4's make an eight

You might be interested in
Write a program that gets a list of integers from input, and outputs the integers in ascending order (lowest to highest). The fi
Travka [436]

Answer:

Explanation:

Since no programming language is stated, I'll use Microsoft Visual C# in answering this question.

// C# program sort an array in ascending order

using System;

class SortingArray {

int n; //number of array elements

int [] numbers; //Array declaration

public static void Main() {

n = Convert.ToInt32(Console.ReadLine());

numbers = new int[n];

for(int i = 0; i<n; I++)

{

numbers [n] = Convert.ToInt32(Console.ReadLine());

}

SortArray();

foreach(int value in numbers)

{

Console.Write(value + " ");

}

}

void SortArray()

{

int temp;

// traverse 0 to array length

for (int i = 0; i < numbers.Length - 1; i++)

// traverse i+1 to array length

for (int j = i + 1; j < numbers.Length; j++){

// compare array element with all next element

if (numbers[i] < numbers[j])

{

temp = numbers[i];

numbers[i] = numbers[j];

numbers[j] = temp;

}

}

}

5 0
3 years ago
What customization feature can you use to create a cohesive look and feel for your presentations
yan [13]

B.Custom Themes

I have to add text so I can post this answer

5 0
3 years ago
Build three classes that conform to the following interfaces. Use arrays in creating your classes (e.g., do not use the built-in
daser333 [38]

Explanation:

public class ArrayList {

private Object[] array = new Object[1];

/**

 * Places new element at location

 * @param c, element to be inserted

 * @param i, location it is to be placed

 */

public void insert(char c, int i) {

 if(i>this.size()){

  System.out.println("Index "+i +" outside of list size; max: " +this.size());

  System.exit(0);

 }

 int count = 0;

 try {

  Object[] other = new Object[this.array.length+1];

  switch(i){

     case 0:{

      other[0] = c;

      for(int j=1;j<this.array.length;j++)

       other[j] = this.array[j-1];

       

      this.array = other;

      break;

     }

     default: {

      for(int j=0;j<i;j++)

       other[j] = this.array[j];

      other[i] = c;

      for(int k=i+1;k<this.array.length;k++)

       other[k] = this.array[k-1];

      this.array = other;

      break;

     }

     }

 }

 catch(ArrayIndexOutOfBoundsException exception) {

     largerArray();

     if(++count == 2){

      System.out.println("Something went wrong.");

      System.exit(0);

     }  

 }

}

 

/**

 * Places new element at location

 * @param object, element to be inserted

 * @param index, location it is to be placed

 */

void insert(Object object, int index){

 if(index>this.size()){

  System.out.println("Index "+index +" outside of list size; max: " +this.size());

  System.exit(0);

 }

 int count = 0;

 try {

  Object[] other = new Object[this.array.length+1];

  switch(index){

     case 0:{

      other[0] = object;

      for(int j=1;j<this.array.length;j++)

       other[j] = this.array[j-1];

       

      this.array = other;

      break;

     }

     default: {

      for(int j=0;j<index;j++)

       other[j] = this.array[j];

      other[index] = object;

      for(int k=index+1;k<this.array.length;k++)

       other[k] = this.array[k];

      this.array = other;

      break;

     }

     }

 }

 catch(ArrayIndexOutOfBoundsException exception) {

     largerArray();

     if(++count == 2){

      System.out.println("Something went wrong.");

      System.exit(0);

     }  

 }

}

 

/**

 * Removes element at index

 * @param index, location to remove

 * @return temp, object removed

 */

Object remove(int index){

 if(index>this.size()){

  System.out.println("Index "+index +" outside of list size; max: " +this.size());

  System.exit(0);

 }

 Object temp = this.array[index];

 int count = 0;

 try {

  Object[] other = new Object[this.array.length-1];

  switch(index){

     case 0:{

      other[0] = this.array[1];

      for(int j=1;j<this.size();j++)

       other[j] = this.array[j+1];

       

      this.array = other;

      break;

     }

     default: {

      for(int j=0;j<index;j++)

       other[j] = this.array[j];

      for(int k=index;k<this.size();k++)

       other[k] = this.array[k+1];

      this.array = other;

      break;

     }

     }

 }

 catch(ArrayIndexOutOfBoundsException exception) {

     largerArray();

     if(++count == 2){

      System.out.println("Something went wrong.");

      System.exit(0);

     }  

 }

 return temp;

}

 

/**

 * Copies the array to a new array twice the size.

 */

public void largerArray(){

 Object[] other = new Object[this.array.length*2];

 System.arraycopy(this.array, 0, other, 0, this.array.length);

 this.array = other;

}

 

/**

 * @return true if there are null elements

 */

public boolean isEmpty() {

 boolean bool = true;

 for (Object element : this.array) {

  if(element!=null){

   bool = false;

   break;

  }

  else{

   bool = true;

   break;

 }

 }

 return bool;

}

 

/**

 * Determines the real length of the array

 * @return length of non-null elements

 */

public int size(){

 int count = 0;

 for(int i=0;i<this.array.length;i++){

  if(this.array[i]==null)

   continue;

  else

   count++;

 }

 return count;

}

 

/**

 * Converts array to string.

 * @return the Array as a string

 */

public String toString(){

 String string = "";

 for(int i=0;i<this.size();i++){

  if(i<this.size()-1)

   string += this.array[i]+", ";

  else

   string += this.array[i];

 }

 return string;

}

 

/**

 * Similar to get, imput the character, retrieve index.

 * @param object, what we're looking for

 * @return index

 */

int indexOf(Object object){

 int index = -1;

 for(int i=0;i<this.array.length;i++){

  if(this.array[i]==(object))

   index = i;

  else continue;

 }

 return index;

}

 

/**

 * @param object, Arraylist tyoe

 * @return true, if the elements of the arrays are equivalent.

 */

public boolean equals(ArrayList object){

 boolean bool = false;

 int thisLength = this.array.length;

 int objectLength = object.array.length;

 if(thisLength > objectLength){

  for(int i=0;i<this.array.length;i++)

   if(this.array[i] == object.array[i])

    bool = true;

   else{

    bool = false;

    break;

   }

 }

 else{

  for(int i=0;i<object.array.length;i++)

   if(this.array[i] == object.array[i])

    bool = true;

   else{

    bool = false;

    break;

   }

 }

 return bool;

}

 

/**

 * Getter to check what is at an index

 * @param index, location

 * @return the character at this position

 */

Object get(int index){

 return this.array[index];

}

}

6 0
2 years ago
Question 1. (50 points) 1.Write a program that computes information related to a sequence of entries regarding age of customers.
schepotkina [342]

Answer:

The solution code is written in Python 3:

  1. count = 0
  2. totalAge = 0
  3. group1_count = 0    #age < 10
  4. group2_count = 0    #age 10 - 20
  5. group3_count = 0    #age 20 - 40
  6. group4_count = 0    #age > 40
  7. group1_total = 0    #subtotal age <= 10
  8. group2_total = 0    #subtotal age 11 - 20  
  9. group3_total = 0    #subtotal age 21 - 40  
  10. group4_total = 0    #subtotal age > 40
  11. age = int(input("Input an age: "))
  12. youngest = age
  13. oldest = age
  14. while(age != -1):
  15.    count += 1
  16.    totalAge += age
  17.    
  18.    if(age <= 10):
  19.        group1_count += 1
  20.        group1_total += age
  21.    elif(age <= 20):
  22.        group2_count += 1
  23.        group2_total += age
  24.    elif(age <= 40):
  25.        group3_count += 1
  26.        group3_total += age
  27.    else:
  28.        group4_count += 1
  29.        group4_total += age
  30.    if(youngest > age):
  31.        youngest = age  
  32.    
  33.    if(oldest < age):
  34.        oldest = age  
  35.    age = int(input("Input an age: "))
  36.    
  37. totalCustomer = count  
  38. avgAge = totalAge / count  
  39. rangeAge = oldest - youngest  
  40. avgAgeGroup1 = group1_total / group1_count  
  41. avgAgeGroup2 = group2_total / group2_count  
  42. avgAgeGroup3 = group3_total / group3_count  
  43. avgAgeGroup4 = group4_total / group4_count  
  44. print("The total number of customers: " + str(totalCustomer))
  45. print("Total number of customer in Group 1 (<=10): " + str(group1_count))
  46. print("Total number of customer in Group 2 (11 - 20): " + str(group2_count))
  47. print("Total number of customer in Group 3 (21 - 40): " + str(group3_count))
  48. print("Total number of customer in Group 4 (> 40): " + str(group4_count))
  49. print("Average age for all customer: " + str(avgAge))
  50. print("Youngest age: " + str(youngest))
  51. print("Oldest age: " + str(oldest))
  52. print("The range of age: " + str(rangeAge))
  53. print("Average age for group 1 (<=10): " + str(avgAgeGroup1))
  54. print("Average age for group 2 (11 - 20): " + str(avgAgeGroup2))
  55. print("Average age for group 3 (21 - 40): " + str(avgAgeGroup3))
  56. print("Average age for group 4 (> 40): " + str(avgAgeGroup4))

Explanation:

Firstly, create the counter variables (e.g. count, group1_count, group2_count etc ) to track the total number of customer and number in each age group. Besides, create variables to hold the value of total of age and sub-total of each age group (Line 1 - 10). We presume there are only four age groups.

Next, prompt user to input the first age (Line 12)

Create variable youngest and oldest to track the lowest and highest age (Line 13 -14). At the moment, set the first input age as value of youngest and oldest.

Create a while loop with sentinel value  -1 (Line 16). Within the loop, track the customer occurrence by incrementing counter variables by one (Line 17, 21, 24, 27 & 30). At the same time, add the current input age to totalAge and to group total (Line 18, 22, 25, 28, & 31).

If the current youngest value is bigger than the current input age, we set the current age to youngest (Line 33- 34).

If the current oldest value is smaller than the current input age, we set the current age to oldest (Line 36- 37).

After terminating the loop with -1, calculate the average age for all customers and for each age group and the range of age (Line 42- 48)  

At last, display all the required calculation results using print function (50 - 62)

7 0
2 years ago
how do i turn off itallics on a school chromebook i accidentally turned them on in another tab and i dont know how to undo them
Rudiy27
U go in to the bar with i b u the is italics and u press it again and it will turn it off but u have to have the text selected
5 0
2 years ago
Other questions:
  • At the moment i am tackling the cs50x projects and i need a little bit of help with problem set 1, the 'greedy algorithm'. I am
    5·1 answer
  • The file extensions .webm, .m4v, and .ogv are used for:
    15·1 answer
  • When was unicode invented?
    13·1 answer
  • What is the output of the following program?
    11·1 answer
  • The costs incurred when a firm buys on the marketplace what it cannot make itself are referred to as
    6·1 answer
  • Declare an ArrayList of Strings. Add eight names to the collection. Output the Strings onto the console using the enhanced for l
    9·1 answer
  • What is the top 3 cloud provider in the world with statics or data including the example and reason(s).
    11·1 answer
  • A toolbar of round buttons that appear when you move the mouse when in Slide Show view id called ____________.A toolbar of round
    8·1 answer
  • When the user types into a Textbox control, the text is stored in the control's __________ property.
    6·1 answer
  • Complete the sentence about bias and equity.
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!