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
Ksivusya [100]
3 years ago
9

a boolean variable named rsvp an int variable named selection, where 1 represents "beef", 2 represents "chicken", 3 represents "

pasta", and all other values represent "fish" a String variable named option1 a String variable named option2 (a) Write a code segment that prints "attending" if rsvp is true and prints "not attending" otherwise. Write the code segment below.
Computers and Technology
2 answers:
jekas [21]3 years ago
8 0

Answer:

The code segment is written in Java.

  1.        boolean rsvp = true;
  2.        int selection;
  3.        String option1;
  4.        String option2;
  5.        if(rsvp == true){
  6.            System.out.println("attending");
  7.        }else{
  8.            System.out.println("not attending");
  9.        }

Explanation:

Declare all the variables as required by the question (Line 1 - 4).

Create a control structure using if-else statements so that when rsvp equal to true, the program will display "attending" else it will display "not attending".

 

Nataliya [291]3 years ago
5 0

Answer:

#include <iostream>

int main() {

   bool rsvp = false;

   int selection;

   string option1, option2;

   if (rsvp == true) {

       cout<<"Attending \n" ;

   }  else {

       cout<<"Not Attending \n";

   }

   return 0;

}

Explanation:

I'm not sure if there's something more to this exercise, but the above code is what you want, based on the question.

You might be interested in
Imagine that you were hired to create the label for a new brand of soup. The client wants to emphasize that the soup has homemad
lidiya [134]

Answer:

Explanation:

For tools, I would simply use Adobe Photoshop to create the label/poster for the brand of soup. In order to make the poster or representation of the soup look homemade, I would place a picture of a kid drinking the soup at a kitchen table with a picture of the mom in the background kitchen. Then I would create a light yellowish tint in the image and steam coming from the soup bowl. This would help the brand represent a form of memory to a delicious homemade meal by a parent.

4 0
3 years ago
I need the solution to this task please anyone
KIM [24]

Answer:

.

Explanation:

8 0
3 years ago
You have spent $4,000 on liquor for your bar. Your bar sales have been $24,000. What is your cost of sales for liquor, expressed
amid [387]

Answer:

17%

Explanation:

Given parameters:

Cost price of liquor = $4000

Total sale = $24000

Unknown:

Percentage cost of sale for liquor = ?

Solution:

To find the percentage cost of sale;

       %Cost of sale of liquor = \frac{cost price of liquor}{Total cost of sale }   x 100

Input the variables;

       %Cost of sale of liquor = \frac{4000}{24000}  x 100 = 16.67% = 17%

8 0
3 years ago
What is another name for a port on routers?
Natali5045456 [20]
Another name for port on routers is interface (port interface). The interface is defined with its physical position on the router and its IP address. Also other properties can be defined <span>such as the speed, maximum transmission unit (MTU), and the encapsulation type. 
</span>Defining the settings on the router is called configuration. 
6 0
3 years ago
TensorFlow and Pytorch are examples of which type of machine learning platform?
densk [106]
Both TensorFlow and PyTorch are examples of a robust machine learning library.

4 0
2 years ago
Other questions:
  • Para saan po yung points dito?
    15·1 answer
  • Who is affected by electronuc theft of a song ?
    14·2 answers
  • Select what's true about Search Engine Companies. Check All That Apply The information contained in a search engine database is
    12·1 answer
  • If you used a peach as a model of an animal cell, what would the peach's skin represent? A.nucleus B.cell wall C.cytoplasm D.cel
    10·2 answers
  • Public relations strives to foster goodwill between a client and a audience ​
    8·1 answer
  • Paths describe the location of folders and files on your computer. If you have saved your work to c:\documents, then your work h
    12·1 answer
  • 4.11 lesson practice edhesive
    8·2 answers
  • Suppose an IP packet is fragmented into 10 fragments, each with a 1% (independent) probability of loss. To a reasonable approxim
    15·1 answer
  • How do you check to see if the user entered more than one character? Complete the code.
    14·1 answer
  • Compare and contrast hardware and software.
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!