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

A and B have same output or not? A B x=0 x=0 do do x<3 x=x+1 x=x+1 print x print x while x<3 while

Computers and Technology
1 answer:
katen-ka-za [31]3 years ago
6 0

Answer:

A and B have different output:

A output will be 1

B output will be 123

Explanation:

A

X = 0

do x < 3

x = x+1

print x

while

B

X = 0

do x = x+ 1

print x

while x < 3

For statement A the condition statement which suppose to be after "while" is not set therefore the value of x will be printed.

For statement B the condition statement is set "x < 3" in front of "while" thereby result in iteration until the condition is false.

Statement A output will be 1

Statement B output will be 123

You might be interested in
Please I need help with this !!!! <br> Complete the table given below.
UkoKoshka [18]

Answer:

  • DBMS , function - include concurrency, security, backup and recovery, integrity and data descriptions.
  • Software calculator , category - calculator
  • DTP , function - Creating, editing, saving and printing documents.
8 0
3 years ago
how many squares can be formed by connecting four of the dots in this 5x5 array? (make sure to consider all types of squares!)
aliina [53]

25 SQUARES

How this is calculated?

  • The size of the squares doesn't matter, since the number of squares will be the same.
  • We have a row of 5 squares: and on top of this you stack 5 more squares.
  • Doing this for a total of 5 times so that we  have 5 rows with 5 squares each.
  • So we have 5 + 5 + 5 + 5 + 5 = 25 squares.

What is an array?

  • An array is a data structure that holds similar, related data.
  • Before an array can be used, it must be declared. To declare an array a programmer gives it at least two properties:
  1. an identifier
  2. a size - the number of elements it will hold

To know more about arrays, refer:

brainly.com/question/26104158

#SPJ4

4 0
1 year ago
_________ products/services are more quickly consumed,usually in a single use or a few usage occasions.
stiks02 [169]

Answer: Non durable

Explanation:

Non durable products/services are more quickly consumed,usually in a single use or a few usage occasions. Examples of these product include daily eatables which has to be consumed within a few days or it will perish and other services such as medical and etc.

4 0
2 years ago
A teacher has five students who have taken four tests. The teacher uses the following grading scale to assign a letter grade to
AlladinOne [14]

Answer:

#include <iostream>

using namespace std;

int main()

{

const int numofStudents = 5;//number of students

const int numofTests = 2;//number of tests taken by students

const int grade = 5;//number of grades available

char letter[grade] = { 'A','B','C','D','F' };

double table[numofStudents][numofTests];//defining 2darray with names and scores

string names[numofStudents];//storing names of students

for (int num = 0; num < numofStudents; num++)//storing names and scores of students

{

 cout << "Enter student's name: ";

 cin >> names[num];

 for (int test = 0; test < numofTests; test++)//scores loop

 {

  cout << "Enter the test score: ";

  cin >> table[num][test];

  if (table[num][test] < 0 || table[num][test]>100)//input validation

  {

   cout << "Invalid input. Try again" << endl;

   cin >> table[num][test];//input again

  }

 }

}

for (int i = 0;i < numofStudents;i++)//calculating averages and grades

{

 int sum = 0;

 cout << "Test scores for " << names[i] << ": " << endl;

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

 {

  cout << table[i][j] << " ";

  sum += table[i][j];//summing scores

 }

 cout << endl;

 float average = (float)sum / numofTests;//calculating the average

 cout << "Making an average of: "<< average;

 if (average <= 100 && average >= 90)//assigning a grade

 {

  cout << " and has received an " << letter[0];

 }

 else if (average <= 89 && average >= 80)

 {

  cout << " and has received a " << letter[1];

 }

 else if (average <= 79 && average >= 70)

 {

  cout << " and has received a " << letter[2];

 }

 else if (average <= 69 && average >= 60)

 {

  cout << " and has received a " << letter[3];

 }

 else if (average <= 59 && average >= 0)

 {

  cout << " and has received an " << letter[4];

 }

 else

 {

  cout << "Invalid scores entered." << endl;

 }

 cout << endl;

}

 return 0;

}

Explanation:

We first define the number of students, number of tests and number of grades available for assignments. We then fill in the 2D array of students names and their scores making sure assigning more than 100 and less than 0 is not allowed. We then sum the scores and retrieve an average. Using the average, a letter grade is assigned to that individual.

6 0
2 years ago
Select the correct answer.
True [87]

Answer:

office access cars

Explanation:

<em><u>HOPE</u></em><em><u> </u></em><em><u>THIS</u></em><em><u> </u></em><em><u>WILL</u></em><em><u> </u></em><em><u>HELP</u></em><em><u> </u></em><em><u>U</u></em><em><u>,</u></em><em><u> </u></em><em><u>MARK</u></em><em><u> </u></em><em><u>ME</u></em><em><u> </u></em><em><u>AS</u></em><em><u> </u></em><em><u>A</u></em><em><u> </u></em><em><u>BRAINLIST</u></em>

3 0
2 years ago
Other questions:
  • Lance has three tables in his database he wants to generate a report to show the data from the three table so he decides to link
    6·2 answers
  • 9. Name at least two types of hard drives?
    6·1 answer
  • 1. Mobile devices have a _________ viewport that displays a web page content that fits within a mobile screen.
    11·1 answer
  • Walking paths across the part is represented by the equation why equals -4x - 6​
    9·1 answer
  • Digital manufacturing has impacted our world today! List a reasons why.
    11·1 answer
  • Can someone tell me a user to an admin on brainly I got a person sending "inappropriate pictures" all over brainly
    13·1 answer
  • Which of these statements describes the difference between binary and decimal numbers?
    11·2 answers
  • If you wish to maintain a consistent style to all the documents you create, it would be helpful to use a _​
    5·1 answer
  • Consider the following declaration:
    11·1 answer
  • Frequently used _____________ can be saved as _____________ for use in analysis, dashboards, reports, tickets, and alerts.
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!