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
algol [13]
3 years ago
13

Write an algorithm and draw flowchart to print 30 terms in the following sequence

Computers and Technology
1 answer:
valina [46]3 years ago
3 0

Answer:

/*

I don't know what language you're using, so I'll write it in javascript which is usually legible enough.

*/

console.log(buildSequence(30));

function buildSequence(maxVal){

   maxVal = Math.abs(maxVal);

   var n, list = [];

   for(n = 1; n < maxVal; n++){

       /*

        to check for odd numbers, we only need to know if the last bit

        is a 1 or 0:

       */

       if(n & 1){ // <-- note the binary &, as opposed to the logical &&

           list[list.length] = n;

       }else{

           list[list.length] = -n;

       }

   }

   return list.implode(',');

}

You might be interested in
Which automated method for VPN connection deployment would work best in combination with Microsoft Intune or Microsoft Endpoint
maks197457 [2]

There are different kinds of automated method for VPN connection deployment. The automated method for VPN connection deployment would work best  is ProfileXML

  • ProfileXML is known to be often used as a delivery methods in Windows PowerShell, Microsoft Endpoint Configuration Manager, and Intune. For an individual to be able to use the ProfileXML VPNv2 CSP setting, one have to construct XML by using the ProfileXML schema.

An individual can configure the Always On VPN client by using the PowerShell, Microsoft Endpoint Configuration Manager, or Intune. They all need an XML VPN profile to configure the appropriate VPN settings.

Learn more from

brainly.com/question/25554117

3 0
2 years ago
CHALLENGE ACTIVITY 4.2.2: Basic while loop with user input. Write an expression that executes the loop while the user enters a n
tino4ka555 [31]

Answer:

#include<iostream>

using namespace std;

int main()

{

int userNum;

userNum=9;

while(userNum>=0)

{

  cout<<"Body"<<endl;

  cin>>userNum;

}

cout<<"Done"<<endl;

return 0;

}

Explanation:

  • Use the userNum >= 0 expression that executes the loop while the user enters a number greater than or equal to 0.
  • Print the userNum inside the while loop.
3 0
3 years ago
Which can be used to create a poll on a web page? <br>CSS<br>HTML <br>JavaScript <br>Text editor​
NeX [460]

Answer:

HTML can be used to create a poll on a web page.

4 0
2 years ago
A web designer is creating a web site and wants each browser to resize the text size to look the same in each device. what measu
adelina 88 [10]
The designer could use the measurements in pixels. 
4 0
3 years ago
You can place an insertion point by clicking in the field or by pressing ____.
Slav-nsk [51]
You can place an insertion point by clicking in the field or by clicking F2 keyboard shortcut. Insertion point is usually characterized by a blinking vertical line that allows you to insert a next character that you wanted.
4 0
3 years ago
Other questions:
  • Your new home has a vacuum system. what kind of computer is controlling it?
    5·1 answer
  • Less than 40 percent of teens have used marijuana within the past year. True or false?
    8·1 answer
  • A(n) ____ is a request for specific data from a database.
    9·1 answer
  • Write a function named get_my_age that returns your age as an int (this is YOUR age, so if you were 21 you would return the numb
    11·1 answer
  • The primary function of application software is to apply the power of the computer to enable people, workgroups, and the entire
    7·1 answer
  • Light is a key formal element that film artists and technicians carefully manipulate to create mood, reveal character, and conve
    15·1 answer
  • You can use a minus sign to make a negative numberlike -2. What happens to each of the following 2++2
    8·1 answer
  • If you wanted to divide an integer variable by 2, which of the following lines of code would you use? total = int + 2 total = in
    6·1 answer
  • Aspire is a test you take to prepare for the<br> A. PSAT<br> B. SAT<br> C. ACT<br> D. FAFSA
    11·1 answer
  • A 4"x6" photo is digitized using 10,000 pixels. An 11"x7" photo is digitized using 30,000 pixels. Which image will have the bett
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!