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
asambeis [7]
3 years ago
15

Create detailed pseudocode for a program that calculates how many days are left until Christmas, when given as an input how many

weeks are left until Christmas. Use variables named weeks and days.
Computers and Technology
1 answer:
Sedaia [141]3 years ago
6 0

Answer:

Following are the Pseudocode for the above problem:

Explanation:

  • Declare weeks and days As Variables
  • Output: "Enter the input for weeks are left until Christmas."
  • Set weeks = user answer
  • Set days = weeks *7
  • Output: “The days left until Christmas is ”
  • Output: days.

Output:

  • If the user inputs 2 then the output is "The days left until Christmas is 14"
  • If the user inputs 3 then the output is "The days left until Christmas is 21"

Pseudocode Explanation:

  • Pseudocode is the solution to any problem which is written in the form of the English language.
  • The only difference between the algorithm and Pseudocode is that the algorithm is only written in English and the Pseudocode is written in the form of input and output.

You might be interested in
Give an example of an if/else statment and a case statment that are equivalent. Your example should contain at least three choic
zimovet [89]

Answer:

The if - else and equivalent switch case statements in c++ language are given below.

if ( ch == 1 )

       cout << " sum is " << x + y << endl;

   else if ( ch == 2 )

       cout << " difference is " << x - y << endl;

   else if ( ch == 3 )

   {

       cout << " Quitting " << endl;

       exit;

   }

switch( ch )

   {

       case 1 :    cout << " Sum is " << x + y << endl;

                   break;

       case 2 :    cout << " Difference is " << x - y << endl;

                   break;

       case 3 :    cout << " Quitting " << endl;

                   break;

   }      

Explanation:

The above statements use three variables which are declared and initialized as shown.

int x = 10;

    int y = 25;

    int ch;

The above statements execute for of addition, subtraction or to quit the program.

cout << " 1. Addition " << endl;

    cout << " 2. Subtraction. " << endl;

    cout << " 3. Quit " << endl;

    cout << " Enter your choice " << endl;

The variable ch holds the numerical option entered by the user.

    cin >> ch;

For if - else statements, the if statement is executed based on the value of variable ch entered by the user. After execution, the compiler goes out of the statements automatically.

Following the if – else, if any statement is present, it will be executed.

For switch case, every case ends with break keyword. After the required case is executed based on the value of variable ch entered by the user, the break statement is executed which causes the switch case to terminate the control goes out of the statements.

Following the switch case, if any statement is present, it will be executed.

4 0
3 years ago
A concave lens is also called a diverging lens. please select the best answer from the choices provided t f
nlexa [21]

The answer is true because a concave lens is also called a diverging lens.


5 0
3 years ago
A system with an availability of 99.999% can be down for a maximum of 52 minutes per year.
rjkz [21]
False. Just calculate what those five mins mean. And remember in percents so you have to divide by an extra 100

Five-nines or 99.999% availability means 5 minutes, 15 seconds or less of downtime in a year. Or, if you are really ambitious, shoot for six nines or 99.9999% availability, which allows 32 seconds or less downtime per year.
5 0
3 years ago
Can u please help me solve this
azamat

Alice has twice as many pencils as Cara. Leon has three more pencils than Alice. The three children have a total of 58 pencils.

<h3>What are the no. of pencils?</h3>

The no. of pencils are there totally as the 11.

Read more about the basic maths:

brainly.com/question/19493296

#SPJ1

4 0
2 years ago
The amount of white space or vertical space between the lines of the text in a paragraph is called line spacing.
jekas [21]

Answer:

It is a true statement .

3 0
3 years ago
Other questions:
  • Blood alcohol level is the ratio between the alcohol consumed and the blood in the body
    10·1 answer
  • What standard linux utility is used to install and configure software on centos operating systems?
    8·1 answer
  • What is the process of getting as many people as possible to visit your website called? A. Maximizing keyword potential B. Direc
    9·2 answers
  • What is an icon or animation used to represent a participant in an internet chat referred to as
    15·2 answers
  • What are the possible sources of the information that defines the functional dependencies that hold among the attributes of a re
    15·1 answer
  • In C++ Please :
    6·1 answer
  • After an attacker has successfully gained remote access to a server with minimal privileges, which of the following is their nex
    15·1 answer
  • I need help with writing the code in Python that draws an arrow pointing to the right.
    15·1 answer
  • Discuss the following
    14·1 answer
  • III. FILL-IN THE BLANK (five points each)
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!