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
ryzh [129]
2 years ago
13

write pseudocode to represent the logic of a program that allows the user to enter two values. The program outputs the sum of an

d the difference between the two values.
Computers and Technology
1 answer:
valkas [14]2 years ago
4 0

The pseudocode representing the above described logic of a program is:

start

input num1

input  num2

set product  =  num1*num2

output product

stop

See the related flow chart is attached.

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

Pseudocode is a precise yet comprehensible explanation of what a computer program or algorithm must perform, written in normal language rather than programming language.

Pseudocode is occasionally used as a detailed phase in the development of a program.

Learn more about Pseudocode:
brainly.com/question/24953880
#SPJ1

You might be interested in
To quit, a user types 'q'. To continue, a user types any other key. Which expression evaluates to true if a user should continue
devlian [24]

Answer:

!(key == 'q')

Explanation:

Based on the description, the coded expression that would equate to this would be

!(key == 'q')

This piece of code basically states that "if key pressed is not equal to q", this is because the ! symbol represents "not" in programming. Meaning that whatever value the comparison outputs, it is swapped for the opposite. In this case, the user would press anything other than 'q' to continue, this would make the expression output False, but the ! operator makes it output True instead.

3 0
2 years ago
What are the home row keys?
kramer
ASDF JKL; are the home row keys.
7 0
3 years ago
Using language c, find the nth Fibonacci, knowing that nth Fibonacci is calculated by the following formula: - If n = 1 Or n = 2
Nina [5.8K]

Answer:

#include <stdio.h>

int fib(int n) {

 if (n <= 0) {

   return 0;

 }

 if (n <= 2) {

   return 1;

 }

 return fib(n-1) + fib(n-2);

}

int main(void) {

 for(int nr=0; nr<=20; nr++)

   printf("Fibonacci %d is %d\n", nr, fib(nr) );

 return 0;

}

Explanation:

The code is a literal translation of the definition using a recursive function.

The recursive function is not per se a very efficient one.

4 0
3 years ago
What makes an active heat sink different from a passive heat sink?
zimovet [89]
An active heat sync will keep a computer cool and basically cool the CPU and processors. A passive heat sink will only cool the CPU and whatever else it needs to cool when the CPU actually NEEDS to be cooled. I am not sure if this is all correct but I know about basic heat syncs and from my understanding this is right.
8 0
3 years ago
Using recursion, write a program that asks a user to enter the starting coordinates (row, then column), the ending coordinates (
Luden [163]

Answer:

The program in Python is as follows

def Paths(row,col):

if row ==0 or col==0:

 return 1

return (Paths(row-1, col) + Paths(row, col-1))

row = int(input("Row: "))

col = int(input("Column: "))

print("Paths: ", Paths(row,col))

Explanation:

This defines the function

def Paths(row,col):

If row or column is 0, the function returns 1

<em> if row ==0 or col==0: </em>

<em>  return 1 </em>

This calls the function recursively, as long as row and col are greater than 1

<em> return (Paths(row-1, col) + Paths(row, col-1))</em>

The main begins here

This prompts the user for rows

row = int(input("Row: "))

This prompts the user for columns

col = int(input("Column: "))

This calls the Paths function and prints the number of paths

print("Paths: ", Paths(row,col))

4 0
3 years ago
Other questions:
  • The protocol that enables computers on the Internet to communicate with each other is called _____.
    7·1 answer
  • Users can make notes or highlight areas of a website and then use the ________ feature of Microsoft Edge to send the highlighted
    13·1 answer
  • Write a program that gets a single character from the user. If the character is not a capital letter (between 'A' and 'Z'), then
    15·1 answer
  • Why is time management considered a soft skill
    10·2 answers
  • Which of the following describes the function of a web browser?
    11·1 answer
  • Write a program num2rome.cpp that converts a positive integer into the Roman number system. The Roman number system has digits I
    8·1 answer
  • What is the answer 11100+01010​
    8·1 answer
  • Write the Flowchart to find Even number between 1 to 50<br>​
    9·1 answer
  • Edhesive in JAVA Write a method that takes a String parameter. If the String has a double letter (i.e. contains the same letter
    13·1 answer
  • Have some points part 6<br>anyone know how to change my username?​
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!