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
Elodia [21]
3 years ago
14

Eight houses represented as cells are arranged in a straight line java int state []

Computers and Technology
1 answer:
monitta3 years ago
8 0

Answer:

int state[] = new int[8];

You might be interested in
#Write a function called "scramble" that accepts a string #as an argument and returns a new string. The new string #should start
mojhsa [17]

Answer:

def scramble(s):

   if len(s) % 2 == 1:

       index = int(len(s)//2)

   else:

       index = int(len(s)/2)

   

   return s[index:] + s[:index]

Explanation:

Create a function called scramble that takes one parameter, s

Check the length of the s using len function. If the length is odd, set the index as the floor of the length/2. Otherwise, set the index as length/2. Use index value to slice the s as two halves

Return the second half of the s and the second half of the s using slice notation (s[index:] represents the characters from half of the s to the end, s[:index] represents the characters from begining to the half of the s)

8 0
4 years ago
WAP to enter a multidigit number and find the sum of only even digits in a number.​
daser333 [38]

Following are the program to calculate even digits sum:

<h3>Program:</h3>

#include <iostream>//header file

using namespace std;

int main()//main method

{

   int a[10],s=0,i;//defining an array and an integer variable

   cout<<"Enter array values: ";//print message

   for(i=0;i<=9;i++)//defining a loop that input array value

   {

       cin>>a[i];//input array value

   }

   for(int i=0;i<=9;i++)//defining loop that check array value

   {

       if(a[i]%2==0)//defining if block that checks even number condition value

       {

           s=s+a[i];//adding even number value

       }

   }

   cout<<"The sum of even number is: "<<s;//print even number sum value

   return 0;

}

Program Explanation:

  • Defining a header file.
  • Defining the main method.
  • Inside the main method, an integer array "a", and two integer variable "s,i" is declared.
  • In the next step, a for loop is declared that input the array value, and after input value another loop is declared that check even number value in array.
  • In this loop it adds array value and after adding the value a print method is declared that prints its value.

Output:

Please find the attached file.

Find out more information about the even number here:

brainly.com/question/4184435

6 0
2 years ago
20 POINTS!!!!!!! Which is considered a collection of code that can be run?
Arte-miy333 [17]

a computer program is a collection of instructions that can be executed by a computer to perform a specific task. A computer program is usually written by a computer programmer in a programming language.

5 0
3 years ago
Shelby is in a college course for half the day and then goes to high school. What program is she in?
Alexus [3.1K]
Dual Credit: Dual credit allows you to take a college course while in High school to earn that particular credit! Hope this helps. 
7 0
3 years ago
Read 2 more answers
What important technology most helps small businesses compete with larger international companies
Novay_Z [31]

Answer: wireless net work

Explanation:

7 0
3 years ago
Other questions:
  • What is a device driver?
    9·2 answers
  • A manufacturer of machine tools creates a spreadsheet of tools and the cost for those. The spreadsheet has four fields: name of
    13·1 answer
  • Which protocol do many browsers assume when you enter a URL in the address field?
    9·1 answer
  • In mathematics, "quadrant I" of the cartesian plane is the part of the plane where x and y are both positive. Given a variable,
    11·1 answer
  • The command button to protect a document is part of the​.
    10·1 answer
  • How do you implement instruction level parallelism
    11·1 answer
  • _________ is the start up sequence a computer conducts.
    9·1 answer
  • Write a java program to read elements in an array from user and count total number of duplicate elements in array.
    12·1 answer
  • Camila wanted to increase the readability of her company newsletter. To do this, she added _____.
    7·2 answers
  • Which email attachments are generally safe to open
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!