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]
2 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]2 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
Does the source MAC address match your PC interface?
Rama09 [41]

Answer: Yes, it does

Explanation:

3 0
1 year ago
To configure a router/modem, what type of IP interface configuration should you apply to the computer you are using to access th
krok68 [10]

Answer:

You would temporarily assign it a fixed IP address in the same subnet as the router's default configuration.

Explanation:

If the router doesn't have DHCP enabled yet, your computer will not get an IP address, so you cannot communicate with it.

8 0
3 years ago
Which wireless communication is typically limited to six feet of distance?
horrorfan [7]

Answer:

bluetooth

Explanation:

cause u need to ask Google

3 0
3 years ago
PLZZZ HELP!!!!!!!
jek_recluse [69]

Answer: A is the correct choice.

5 0
3 years ago
Which one of the following is not possible to view in the debug logs?
Usimov [2.4K]

Answer:

Formula field calculations

Explanation:

We can use debug logs to track events in our company, these events are generated if active users have trace indicators.

A debug log can register information about database operations, system processes and errors, in addition, we can see Resources used by Apex, Workflow Rules, Assignment Rule, HTTP calls, and Apex errors, validation rules. The only one we cannot see is Formula field calculations.

8 0
3 years ago
Other questions:
  • Define a function begins_with_line that consumes a string and returns a boolean indicating whether the string begins with a dash
    15·1 answer
  • Exterior brick veneers are used to support the entire weight of the roof structure
    12·2 answers
  • I need the code for Assignment 5 Animation in Edhesive, its in python code.
    9·1 answer
  • Which of the following is NOT a web browser?<br> Safari<br> Chrome<br> Bing<br> Firefox
    8·2 answers
  • HELP ASAP U GET BRAINLIEST
    15·2 answers
  • What allows users to connect via the Internet to its private network?
    11·2 answers
  • Question 5(Multiple Choice Worth 5 points)
    10·2 answers
  • Something I should look for when trying to decide if a source is credible is the publication's ....
    10·1 answer
  • Now that you have explored several different languages (Python, HTML, CSS, and JavaScript), what can you do to keep straight whi
    7·1 answer
  • Which of the following shows the correct order of inventions that helped the first computers make calculations?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!