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
omeli [17]
3 years ago
9

7. (a) An algorithm has been written in pseudocode to Input 50 numbers. Positive numbers are stored

Computers and Technology
1 answer:
34kurt3 years ago
7 0

Answer:

The numbers do not have to be stored and the counter is also unnecessary, so take out all lines with PosNum[], NegNum[] and Count.

The repeat...until clause can be changed to:

REPEAT

...

UNTIL Number = 9999

and the IF Number>0 THEN must be changed to

IF Number > 0 AND Number != 9999 THEN

That should do the trick.

You might be interested in
Instructions:Select the correct answer.
VladimirAG [237]

B. audio file is the answer

5 0
3 years ago
Read 2 more answers
For the following data, what is the average number of cycles per instruction?
Komok [63]

Answer:

2.82

Explanation:

The computation of the average number of cycles per instruction is shown below:

=  Arithmetic/logical operations × frequency cycles + Register load operations ×  frequency cycles  + Register store operations  ×  frequency cycles + Unconditional branch instructions ×  frequency cycles + Conditional branch instructions ×  frequency cycles

=  45% × 1 + 18% × 5 + 10% × 2 + 7% × 1 + 20% × 6

= 0.45 + 0.9 + 0.2+  0.07 + 1.2

= 2.82

7 0
4 years ago
use c , c, java or python (any one) programming language for the following programming exercises. do not call built-in library f
Karo-lina-s [1.5K]

A function that receives a string containing a 32-bit hexadecimal integer. the function must return the decimal integer value of the hexadecimal integer.

<h3>The C++ Program</h3>

#include<iostream>

#include <cstring>

#include <string>

using namespace std;

int getDecimalForm(string);

int main() {

 // string binary;

 // Reads both 0 and B as int 48 while B should be

 string hexadecimal = "01F12EBA";

 int decimalForm;

 int re = hexadecimal[0], te = hexadecimal[1];

 /*cout << "Input an eight digit binary string of 1s and 0s to find the integer

 value in decimal form:\n"; cin >> binary;

 // Input validation

 while (binary.size() != 8 || ((binary[0] != '0' && binary[0] != '1')

 || (binary[1] != '0' && binary[1] != '1') || (binary[2] != '0' && binary[2] !=

 '1')

 || (binary[3] != '0' && binary[3] != '1') || (binary[4] != '0' && binary[4] !=

 '1')

 || (binary[5] != '0' && binary[5] != '1') || (binary[6] != '0' && binary[6] !=

 '1')

 || (binary[7] != '0' && binary[7] != '1')))

 {

 cout << "Input a valid eight digit binary string of only ones and zeros\n";

 cin >> binary;

 }*/

 cout << "The 32-bit binary integer value is " << hexadecimal << endl;

 cout << re << " " << te << " " << hexadecimal[0] - 55 << endl;

 decimalForm = getDecimalForm(hexadecimal);

 cout << endl

      << decimalForm << " is the same integer value expressed in decimal form";

}

// a function in C++ that receives a string containing a 16 - bit binary integer

int getDecimalForm(string hStr) {

 int value, num = 1, total = 0, exponent = 0;

 // Made adding happen starting from the right side

 for (int i = (hStr.size() - 1); i >= 0; i--) {

   if ('0' <= hStr[i] <= '9') {

     cout << hStr[i] << " cat\n";

    if (exponent != 0) {

       for (int j = 0; j < exponent; j++) {

         num *= 16;

       }

     }

     value = num * (hStr[i] - 48);

   }

   if ('A' <= hStr[i] <= 'F') {

     cout << hStr[i] << " dog\n";

     if (exponent != 0) {

       for (int j = 0; j < exponent; j++) {

         num *= 16;

       }

     }

     value = num * (hStr[i] - 55);

   }

   // Keep adding the value of the binary integer

   total += value;

   num = 1;

   exponent++;

 }

 return total;

}


Read more about C++ program here:

brainly.com/question/20339175

#SPJ1

3 0
2 years ago
Which example best demonstrates an impact of computers on health care?
Dennis_Churaev [7]
B-Robotic surgery allows surgeons to make smaller incisions.

Explaination: Anything having to do with medical procedures are healthcare so this is my reasoning.
4 0
3 years ago
Read 2 more answers
in which of the following scenarios would a router send a resign message? answer if a preempted active router fails, the standby
hodyreva [135]

A scenario in which a router would send a resign message include the following: A. if a preempted active router fails, the standby router becomes the active router. If the preempted active router regains service, it sends a coup message. The current active router sends the resign message after receiving the coup message.

<h3>What is a router?</h3>

In Computer technology, a router can be defined as a network device (node) that is designed and developed to connect two (2) different computer networks together, in order to allow them communicate by forwarding and receiving encapsulated data (Ethernet frame) and packets.

<h3>What is a resign message?</h3>

In Computer networking, a resign message can be defined as a set of information that is typically sent by an active Hot Standby Router Protocol (HSRP) network device when it is preparing to go offline or whenever it wants to relinquish the active role due to some other reasons.

This ultimately implies that, a resign message instructs or informs a standby router to get ready to become the active router and take over the active role.

Read more on router here: brainly.com/question/24812743

#SPJ1

8 0
1 year ago
Other questions:
  • Which of the following is not a feature of Hootsuite?
    14·1 answer
  • During flashbacks you experience______.
    14·2 answers
  • Which of the following might not exist in a URL?
    10·2 answers
  • Part cost Calculator Modify the GUI in your program to look like the following GUI. To do that you need to add the following to
    13·1 answer
  • Convert binary number 11101111.10111 to decimal
    5·1 answer
  • You want to save twenty of your vacation pictures on your computer. Which is the best place to save them?
    6·2 answers
  • 11.11 LAB: Number pattern Write a recursive function called PrintNumPattern() to output the following number pattern. Given a po
    13·2 answers
  • Imagine you are the human resource director for a small video game company that employs around 20 coders, managers, artists, etc
    12·1 answer
  • Carmina works at a fast-food restaurant. During the slow afternoon hours, Carmina always find projects to keep her busy, like wa
    6·1 answer
  • Your development team is planning to host a development environment on the cloud. This consists of EC2 and RDS instances. This e
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!