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
Pachacha [2.7K]
3 years ago
9

The Boolean Foundation hosted a raffle to raise money for charity and used a computer program to notify the participants about t

he results. Unfortunately, the program they used was not very robust and all 250 participants received an email telling them that they won... and that their name is Shauna.
Improve this program by writing a function called sendEmail to print a personalized email to stdout. The function should take three parameters:
The name of the recipient
The prize for the raffle
Whether or not the recipient won
Use the email template from the existing program.
#include
using namespace std;
int main() {
cout << "Dear Shauna," << endl;
cout << "You are the winner of our raffle for charity." << endl;
cout << "The prize was: a stuffed giraffe toy" << endl;
cout << "Thank you for giving to charity!" << endl;
cout << "Sincerely," << endl;
cout << "The Boolean Foundation" << endl;
return 0;
}
Computers and Technology
1 answer:
irinina [24]3 years ago
6 0

Answer:

The function is as follows:

void sendEmail(string name, string prize, string win_lose){

cout << "Dear "<<name<<", " << endl;

cout << "You are the "<<win_lose<<" of our raffle for charity." << endl;

cout << "The prize was: "<<prize<< endl;

cout << "Thank you for giving to charity!" << endl;

cout << "Sincerely," << endl;

cout << "The Boolean Foundation" << endl;

}

Explanation:

This defines the function along the three parameters

void sendEmail(string name, string prize, string win_lose){

This prints the salutation with the person's name

cout << "Dear "<<name<<", " << endl;

This prints if the person won or lost

cout << "You are the "<<win_lose<<" of our raffle for charity." << endl;

This prints the prize, if any

cout << "The prize was: "<<prize<< endl;

The following is the closing remark

<em>cout << "Thank you for giving to charity!" << endl;</em>

<em>cout << "Sincerely," << endl;</em>

<em>cout << "The Boolean Foundation" << endl;</em>

<em>}</em>

You might be interested in
18 Select the correct answer.
Elden [556K]

A string for sure, so answer B.

6 0
3 years ago
To execute sas code, you can click on which icon?
faltersainse [42]

To execute SAS code, an icon which you can click on is: e. running man.

<h3>What is SAS?</h3>

SAS is an abbreviation for Statistical Analysis System and it can be defined as a statistical software suite which was developed at North Carolina State University by SAS Institute for the following field of study:

  • Business intelligence
  • Criminal investigation
  • Data management
  • Multivariate analysis
  • Advanced analytics
  • Predictive analytics

In Computer programming, running man is an icon which you can click on, in order to execute SAS code.

Read more on Statistical Analysis here: brainly.com/question/24439065

#SPJ1

7 0
2 years ago
For the purposes of laying out content, the total height of a box is calculated by adding which of the following?
jenyasd209 [6]
<span>When laying out content, the box is calculated by setting the width and height of the element using CSS to the size of the content area, the full size of an element can be calculated by also adding in borders, padding and margins.</span>
6 0
3 years ago
Read 2 more answers
What happens? In word 2016 when the home ribbon tab is clicked on ?
RideAnS [48]

When you clicked on the ribbon tab in word 2016, you'd be brought to the home tab, where all of the basic controls are displaced for you to see.

Hope I could help! :)

5 0
3 years ago
Read 2 more answers
Xét bài toán QUẢN LÝ ĐÀO TẠO. Việc quản lý đào tạo tại một trường đại học có thể được mô tả vắn tắt như sau: Danh sách Giảng viê
gulaghasi [49]

Answer:

write in an English so we can help with that

5 0
3 years ago
Other questions:
  • In your presentation you added a text box to?
    5·1 answer
  • A(n) _____ allows a user to choose specific files to back up, regardless of whether or not the files have been changed.
    9·1 answer
  • A good example of an agency relationship in a hotel is the relationship between a bartender and a server. True False
    6·1 answer
  • Which technology is used to uniquely identify a wlan network?
    14·1 answer
  • When computing effect size, the sample size is ________.
    13·1 answer
  • What is thought to have caused the extinction of the dinosaurs?
    13·1 answer
  • Which search phrase is the most effective to find out about the most popular pizza chains worldwide in 2019?
    9·2 answers
  • You are an IT technician for your company and would like to be able to:
    14·1 answer
  • In cell B20, enter a
    14·1 answer
  • are there any hexadecimal digits that cannot be created using 4 bits? how many bits would you need to represent the hexadecimal
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!