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
Luda [366]
3 years ago
6

1. Realizați o schemă logică pentru un algoritm care sa calculeze suma primelor

Computers and Technology
1 answer:
DIA [1.3K]3 years ago
4 0

Explanation:

The clear rendering reads;

"1. Make a logic diagram for an algorithm to calculate the sum of premiums 100 natural numbers.

2. Make a logic diagram that displays a maximum of 2 natural numbers.

3. Make a logic diagram that displays the square of a natural number".

You might be interested in
This function receives first_name and last_name, then prints a formatted string of "Name: last_name, first_name" if both names a
pishuonlain [190]

Answer:

Following are the program in the C++ Programming Language.

//set header file

#include <iostream>

//set namespace

using namespace std;

//define class

class format

{

//set access modifier

public:

//set string type variable

 string res;

//define function

 void names(string first_name, string last_name)

 {  

//set if-else if condition to check following conditions

   if(first_name.length()>0 && last_name.length()>0)

   {

     res="Name: "+last_name+", "+first_name;

   }

   else if(first_name.length()>0 and last_name.length()==0)

   {

     res="Name: "+first_name;

   }

   else if(first_name.length()==0 and last_name.length()==0)

   {

     res="";

   }

 }

//define function to print result

 void out(){

   cout<<res<<endl;

 }

};

//define main method

int main() {

//set objects of the class

 format ob,ob1,ob2;

//call functions through 1st object

 ob.names("John","Morris");

 ob.out();

//call functions through 2nd object

 ob1.names("Jhon","");

 ob1.out();

//call functions through 3rd object

 ob2.names("", "");

 ob2.out();

}

<u>Output</u>:

Name: Morris, John

Name: Jhon

Explanation:

<u>Following are the description of the program</u>:

  • Define class "format" and inside the class we define two void data type function.
  1. Define void data type function "names()" and pass two string data type arguments in its parameter "first_name" and "last_name" then, set the if-else conditional statement to check that if the variable 'first_name' is greater than 0 and 'last_name' is also greater than 0 then, the string "Name" and the following variables added to the variable "res". Then, set else if to check that if the variable 'first_name' is greater than 0 and 'last_name' is equal to 0 then, the string "Name" and the following variable "first_name" added to the variable "res".
  2. Define void data type function "out()" to print the results of the variable "res".
  • Finally, we define main method to pass values and call that functions.
3 0
3 years ago
I WILL GIVE BRANLIST
qaws [65]

Answer:

space alignment

Explanation:

I'm not sure just taking a guess cuz I'm bored lol

4 0
2 years ago
Read 2 more answers
Convert 1/32 GB into MB​
kiruha [24]

Answer:

31.25 megabytes.

31.25 megabytes

7 0
2 years ago
How to use the copy machine for creating a copy on the auto feed, from 1 sided to 2 sidedcopy. (2-3 paragraphs)
Bond [772]
Just take the page out and flip it.
3 0
3 years ago
Mergesort uses the divide-and-conquer technique to sort a list.<br><br> True<br><br> False
NARA [144]

Answer:

True: Merge Sort sorts a list using divide-conquer approach.

<u>Merge_Sort(B,p,n)</u>  //p is the starting index of array B and n is the last index.

1. if(p<n)

2.        q ← (p+n)/2    //divides the list into two sub-lists

2.        Merge_Sort(B, p, q) //sorts the left half

3.        Merge_Sort(B, q+1, n) //sorts the right half.

4.        Merge(B, p, q, n)

<u>Merge(B, p, q, n)</u>

1.l ← q-p+1.  //no. of elements in left half

2.m ← n-q  //no. of elements in right half.

3.for x ← 1 to l

4.      Left[x] = B[p+x -1] //The elements of left half are copied to Left array

5.for y ← 1 to m.

6.      Right[y]= B[q+y]  //The elements of right half are copied to right array

7. x ← 1, y ←1

8.for z ← p to n.

9.      if( Left[x] ≤ Right[y] ) // to merge the two lists Left and Right, the    //elements are compared.

10.     {   A[z] ← Left[x]   //smaller one comes to the merged list.

11.          x++. }

12.    else

13.      {   A[z] ← Right[y]

14.          y++ }

Explanation:

The Merge_Sort(A, p, n) algorithm first divides the whole array into two halves. Then again divides the sub-lists into it's halves and so on.

Then using merge algorithm it compares the elements of both halves one by one and keep it in sorted order.

6 0
3 years ago
Other questions:
  • Managing your calendar and emails can be easily accomplished through ___ software
    8·1 answer
  • On a piano, a key has a frequency, say f0. Each higher key (black or white) has a frequency of f0 * rn, where n is the distance
    10·1 answer
  • A data flow cannot go directly back to the same process it leaves. There must be at least ________ other process(es) that handle
    15·1 answer
  • You have deployed several 802.11b wireless networks at your company's location. Recently, users complained that they were having
    9·1 answer
  • How to delete Brainly account ?​
    12·1 answer
  • Debevec mentions using the technology he described to animate entire human bodies. Discuss why you think this is or is not a goo
    13·1 answer
  • A _____ network is where all computers are equal and each one is both data requester and data provider.
    13·1 answer
  • This is your code.
    9·1 answer
  • SOMEONE HELP ME!!!!!
    8·1 answer
  • the php function that is executed is a connection to a database cannot be made is the____ function. die | isset| end | connect.
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!