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
A method for selecting multiple lines of text is to _______. select one:
Aliun [14]
I would probably say B even though the other methods might work as well
5 0
3 years ago
Determine the "answer" to the function according to the spreadsheet below: =SUM(A1:A3)/2
nataly862011 [7]
If this is the full question " <span>Which of the following formulas is equivalent to =SUM(A1:A3)? A. =A1+A3 B. =A1+A2+A3 B. =A2 D. =A3-A1"


The answer is </span>
<span>B. =A1+A2+A3 formulas is equivalent to =SUM(A1:A3)</span>
4 0
3 years ago
A market-product strategy that requires no change in the basic product but instead seeks new buyers is known as ______
lina2011 [118]

Answer:

market development

I hope this helps! ^-^

3 0
2 years ago
What are the common characteristics of a bastion host?
Ksju [112]
The bastion host node is typically an influential server with better-quality security actions and custom software. It frequently hosts only a single request because it wants to be very good at whatever it does. The software is commonly modified, limited and not obtainable to the public. This host is envisioned to be the strong fact in the network to care for the system last it. Therefore, it often endures unvarying maintenance and audit. Occasionally bastion hosts are used to draw occurrences so that the basis of the attacks may be outlined. The bastion host practices and filters all inward traffic and averts malicious traffic from incoming the network, acting much like a gateway. 
6 0
3 years ago
CALL NOW $+1-855-241-6569$ aol mail not working on windows ## aol desktop gold email not working||USA||**2020*
LenKa [72]

Answer:

extra 5 points lol

Explanation:

6 0
3 years ago
Other questions:
  • People use a computer connected to the internet to manage financial accounts
    15·1 answer
  • To the following is not a network connection LAM MAN SAN WAN
    9·1 answer
  • What is java Encapsulation?​
    6·1 answer
  • For demultiplexing a UDP socket is identified by:_____.
    15·1 answer
  • If all the data in a database is not physically located in one place, it would be a(n _______ database.
    5·1 answer
  • Breaking down a problem to find the solution is called:
    8·1 answer
  • What is the full path and filename for the file on a Debian Linux distribution that displays the time zone settings?
    13·1 answer
  • A tech class question any help will be greatly apprieciated
    10·1 answer
  • A profit of ₹ 1581 is to be divided amongst three partner P,Q and R in ratio 1/3:1/2:1/5.theshareof R will be?​
    10·1 answer
  • Jamal wants to create a program that will play music during the afternoon. Which kind of loop should be used in the program?
    6·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!