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
Zielflug [23.3K]
3 years ago
6

Write the pseudocode for this flowchart

Computers and Technology
1 answer:
MrMuchimi3 years ago
6 0

Answer:

Explanation:

class TimeToSleep() {

  main bunch of stuff (string argos) {

       int age;

       string comedy;

       bool guess;

        public bool imTheMasterMethod() {

           guess = true;

           while (guess) {

              comedy = "You forgot to put the flowchart, you meathead!";

              println(comedy);

               

                scan("%d", &age);

                if (age < 18) {

                    println("Go to sleep kiddo!");

                }

           }

        }

   }

}

       

You might be interested in
In this scenario, two friends are eating dinner at a restaurant. The bill comes in the amount of 47.28 dollars. The friends deci
pickupchik [31]

Answer:

The java program for the given scenario is as follows.

import java.util.*;

import java.lang.*;

public class Main

{

   //variables for bill and tip declared and initialized

   static double bill=47.28, tip=0.15;

   //variables for total bill and share declared

   static double total, share1;

public static void main(String[] args) {

    double total_tip= (bill*tip);

    //total bill computed

    total = bill + total_tip;

    //share of each friend computed

    share1 = total/2;

    System.out.printf("Each person needs to pay: $%.2f", share1);  

}

}

Explanation:

1. The variables to hold the bill and tip percent are declared as double and initialized with the given values.

static double bill=47.28, tip=0.15;

2. The variables to hold the values of total bill amount and total tip are declared as double.

3. All the variables are declared outside main() and at class level, hence declared as static.

4. Inside main(), the values of total tip, total bill and share of each person are computed as shown.

double total_tip= (bill*tip);

total = bill + total_tip;

share1 = total/2;

5. The share of each person is displayed to the user. The value is displayed with only two decimal places which is assured by %.2f format modifier. The number of decimal places required can be changed by changing the number, i.e. 2. This format is used with printf() and not with println() method.

System.out.printf("Each person needs to pay: $%.2f", share1);  

6. The program is not designed to take any user input.

7. The program can be tested for any value of bill and tip percent.

8. The whole code is put inside a class since java is a purely object-oriented language.

9. Only variables can be declared outside method, the logic is put inside a method in a purely object-oriented language.

10. As shown, the logic is put inside the main() method and only variables are declared outside the method.

11. Due to simplicity, the program consists of only one class.

12. The output is attached.

5 0
4 years ago
Read 2 more answers
The non-conditional boolean logical and operator is written as ____.
bixtya [17]
False because whhy would it be true. words of logic

3 0
3 years ago
A mobile device user has tried to install a new app numerous times without success. She has closed all unused apps, disabled liv
elena-14-01-66 [18.8K]

The correct answer is B. Check for sufficient available storage space.  

Explanation:

One of the factors that can cause it is not possible to install a new app is insufficient storage as space in the mobile device is needed to save the app. This can be easily solved either by deleting apps and other content or expanding the memory available through a Micro SD card. Also, before attempting any major procedure such as a complete reset it is important to check the storage space availability. In this context, the user should check for sufficient available storage space (option B) because this might be the cause of the issue she is experiencing; also, this is a basic step before considering others such as performing a factory reset.

6 0
3 years ago
The producer thread will alternate between sleeping for a random period of time and inserting a random integer into the buffer.
Llana [10]

Answer:

// Producer Thread

void *producer(void *param) {

buffer_item item;

while (true) {

item = rand() % 100;

sem_wait(&empty);

pthread_mutex_lock(&mutex);

if (insert_item(item))

printf("Can't insert item\n");

else

printf("Producer %d: produced %d\n", *((int*)param), item);

pthread_mutex_unlock(&mutex);

sem_post(&full);

}

}

// Consumer Thread

void *consumer(void *param) {

while (true) {

buffer_item item = NULL;

if (in > 0)

item = buffer[in - 1];

sem_wait(&full);

pthread_mutex_lock(&mutex);

if (remove_item(&item))

printf("Can't remove item\n");

else

printf("Consumer %d: consumed %d\n", *((int*)param), item);

pthread_mutex_unlock(&mutex);

sem_post(&empty);

}

}

Explanation:

An outline of the producer and consumer threads appears as shown above.

3 0
3 years ago
Jo.in Goo.gle meet the code/rhk-rvet-tdi​
horrorfan [7]

Answer:

nah

Explanation:

cuz ion wanna

8 0
3 years ago
Other questions:
  • A _________ is the broadcast of various types of media over the web.
    10·2 answers
  • What is the absolute pathname of the YUM configuration file? REMEMBER: An absolute pathname begins with a forward slash
    12·1 answer
  • When an object is falling because of gravity, the following formulacan be used to determine the distance the object falls in asp
    9·1 answer
  • True or false questions. If a statement is false, you must explain the reason why it is false: a). Suppose that TCP is being run
    12·2 answers
  • The mouse pointer becomes different shapes depending on the pointer s location and locations you click on the screen. true false
    6·1 answer
  • Which of these can be considered data ?
    6·2 answers
  • Which of the following best describes professional behavior in the IT field?
    6·1 answer
  • What is computer? Give short answer for this ​
    7·2 answers
  • Plsss help anyone PLSSSSS ​
    13·1 answer
  • When using the red / yellow I green method to present status of a project, green can mean which of the following?
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!