Respuesta :
Answer:
The code segment is written in Java.
- boolean rsvp = true;
- int selection;
- String option1;
- String option2;
- if(rsvp == true){
- System.out.println("attending");
- }else{
- System.out.println("not attending");
- }
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".
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.