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
ad-work [718]
2 years ago
15

The following pseudocode is an example of ____.do stepAdo stepBif conditionC is true thendo stepDelsedo stepEendifwhile conditio

nF is truedo stepGendwhilea. nestingb. stackingc. posttestd. pretest
Computers and Technology
1 answer:
rewona [7]2 years ago
6 0

Answer:

Option d pretest

Explanation:

Given the pseudocode:

  1. do stepA
  2. do stepB
  3. if conditionC is true
  4. then do stepD
  5. else
  6. do stepE
  7. end if
  8. while conditionF is true
  9. do stepG
  10. end while

The pseudocode above shows that there is a pretest before some codes are executed. For example, line 3 check if condition is true then only execute stepD otherwise execute stepE. Line 8 check if conditionF is true then repeatedly execute stepG. These are examples of pretest a condition will must be met (pretest passed) before a block of codes can be executed. This pretest can be seen in if-else statements and also the while condition.  

You might be interested in
Unit 6: Lesson 2 - Coding Activity 1 AP Computer science
sladkih [1.3K]

The complete program is to define a boolean method that returns true if all elements of an array are negative, or return false, if otherwise

The method in java, where comments are used to explain each line is as follows:

//This defines the method

public static boolean chkNegative (double[] myArr) {

   //This initializes a boolean variable

   boolean isNeg = true;

   //This iterates through the array

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

     //If the array element is 0 or positive

     if (myArr[i] >= 0) {

         //Then the boolean variable is set to false

       isNeg = false;

       //And the loop is exited

       break;

     }

   }

   //This returns true or false

   return isNeg;

 }

Read more about boolean methods at:

brainly.com/question/18318709

8 0
2 years ago
What are the two main charaters from maid sama?
Gennadij [26K]

Answer:

Takumi Usui and Misaki Ayuzawa

Explanation:

don't know why this is here

8 0
2 years ago
Read 2 more answers
Suppose we compute a depth-first search tree rooted at u and obtain a tree t that includes all nodes of g.
Temka [501]

G is a tree, per node has a special path from the root. So, both BFS and DFS have the exact tree, and the tree is the exact as G.

<h3>What are DFS and BFS?</h3>

An algorithm for navigating or examining tree or graph data structures is called depth-first search. The algorithm moves as far as it can along each branch before turning around, starting at the root node.

The breadth-first search strategy can be used to look for a node in a tree data structure that has a specific property. Before moving on to the nodes at the next depth level, it begins at the root of the tree and investigates every node there.

First, we reveal that G exists a tree when both BFS-tree and DFS-tree are exact.

If G and T are not exact, then there should exist a border e(u, v) in G, that does not belong to T.

In such a case:

- in the DFS tree, one of u or v, should be a prototype of the other.

- in the BFS tree, u and v can differ by only one level.

Since, both DFS-tree and BFS-tree are the very tree T,

it follows that one of u and v should be a prototype of the other and they can discuss by only one party.

This means that the border joining them must be in T.

So, there can not be any limits in G which are not in T.

In the two-part of evidence:

Since G is a tree, per node has a special path from the root. So, both BFS and DFS have the exact tree, and the tree is the exact as G.

The complete question is:

We have a connected graph G = (V, E), and a specific vertex u ∈ V.

Suppose we compute a depth-first search tree rooted at u, and obtain a tree T that includes all nodes of G.

Suppose we then compute a breadth-first search tree rooted at u, and obtain the same tree T.

Prove that G = T. (In other words, if T is both a depth-first search tree and a breadth-first search tree rooted at u, then G cannot contain any edges that do not belong to T.)

To learn more about  DFS and BFS, refer to:

brainly.com/question/13014003

#SPJ4

5 0
1 year ago
How was the addition of an improvement over early web design?
Vinil7 [7]

Answer:

Early web designs were text oriented.

Explanation:

So the beginning is text and now as the technology has drastically grown the web design also incorporated multimedia like text, audio, video, graphics and animation.

As the improvement started the number visitors, creativity in the content creation, competitiveness and all the other aspect made website creation and design a mandatory factor for any business to grow. How the web design is, it decides the number of visitors and the way the user interacts.

3 0
3 years ago
A String variable, fullName, contains a name in one of two formats:last name, first name (comma followed by a blank), orfirst na
Volgvan

Answer:

#include <iostream>

using namespace std;

int main()

{

   char fullname[30];

   string fname="",lname="";

   int i,j;

   cout<<"Enter fullname\n";

   cin.getline(fullname,30); //so that blank can be read

   for(i=0;fullname[i]!=' ';i++)

       fname+=fullname[i];   //fistname will be saved

      cout<<"\n";

   for(j=i;fullname[j]!='\0';j++)

       lname+=fullname[j];    //lastname will be saved

   cout<<"\nFirstname : "<<fname<<"\nLastname : "<<lname;

   return 0;

}

OUTPUT :

Enter fullname

John thomson

Firstname : John

Lastname : thomson

Explanation:

cin.getline() should be used instead of cin in case of strings so that space can be read otherwise after blank string will be ignored.

8 0
3 years ago
Other questions:
  • What does this translate to?: 01001001 01110011 00100000 01100010 01110010 01100001 01101001 01101110 01101100 01111001 00100000
    5·1 answer
  • Which of the following is NOT a destination?
    12·2 answers
  • Please conduct some research and find an article on Security Threats and please provide link of the article.
    5·1 answer
  • The computer has had far-reaching effects on our lives.how has the computer effected your life?
    8·1 answer
  • You are the administrator of the Sybex website. You are working when suddenly web server and network utilization spikes to 100 p
    15·1 answer
  • A project manager is responsible for (check all that apply)
    13·1 answer
  • Suppose a host has a 1-MB file that is to be sent to another host. The file takes 1 second of CPU time to compress 50%, or 2 sec
    12·1 answer
  • Given the statement: int list[25]; The index can go from 0 to 25 inclusive withoutgoing beyond the end of the array.true or fals
    14·1 answer
  • I figured out the secret message in Dad feels good, I can connect the dots
    8·1 answer
  • How does your ability to correctly count change affect the impression the customer has of you?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!