The Boolean Foundation hosted a raffle to raise money for charity and used a computer program to notify the participants about the 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;
}

Answers

Answer 1

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

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

cout << "Sincerely," << endl;

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

}


Related Questions

(Python) Write an expression that prints 'You must be rich!' if the variables young and famous are both True. Sample output with inputs: 'True' 'True' You must be rich!

Answers

Answer:

young = True

famous = True

if young == True and famous == True:

   print("You must be rich!")

Explanation:

20 pts The Domain Name System translates the URL into
A. client
B. an IP address
C. a website
D. a web browser

Answers

B AN IP ADDRESS hope this helps you

Answer:

adress

Explanation:

( PLZ HELP I WILL MARK MOST BRAINLIEST) A city is facing shortfall and may have to raise taxes before taking this step the mayor decides to form a task force of his supporters and opponents to study the issue and recommend solutions ,
What leadership qualities do the mayors actions demonstrate.

A. Collaboration
B. Time management skills
C. Effective communication
D. Following others

Answers

Answer:

collaboration

Explanation:

the mayor is working together with people and to make it have better sense an example would be the slang word collab that singers use when making a song together

Answer:

A. Collaboration

Explanation:

First off, I will explain why the other answers are incorrect. There is no discussion about time and how it is incorporated into the situation, so the answer cannot be "B.". "D." is not correct because the mayor is not following, he is leading. And "C." cannot be correct as the process hasn't even started yet. "A." IS the answer because the mayor is working together with other experts to help solve the situation.

Draw a flowchart diagram for a program that display a person's name x times​

Answers

Answer:

See attachment for flowchart

Explanation:

The flowchart is as follows:

Step 1: Start

This signals the beginning of the flowchart

Step 2: Input name, x

This gets input for name and x from the user

Step 3: count = 0

This initializes count to 0

Step 4: Print name

This prints the person's name

Step 5: count = count + 1

This increments the number of times the name has been printed

Step 6: count = x?

This checks if the number of times the name has been printed is x times

If yes, step 7 is executed.

If no, step 4 is executed

Step 7: Stop

This signals the end of the flowchart

Which Backstage view feature helps you to specifically remove customized information from a document? Protect Document Feedback Properties Manage Document

Answers

Explanation:

Properties. 100% correct. goodluck.

Answer:

properties on edg.

Explanation:

identify the web browser used in your school lab or at home.why do you think there need to be more than one browser.​

Answers

Answer:

Chrome, Edge, and Firefox.

Explanation:

Utilizing different browsers make sense depending upon websites that you are using. Not every site is optimized for one standard browser. Also, Microsoft has discontinued supporting their Internet Explorer browser. That means they no longer update, share security patches, or support it. Some websites or software works better with the Chrome browser, while it is not optimized for others. When looking at websites using Firefox, if the site isn't optimized for it, the site layout will not be easily read or used. Clicking on links on the browser can cause errors or a malfunction. A variety of coders, software authors or companies create sites or software using different code and algorithms. That is the basis of differences in site and software functionality.

Match the tasks with the professionals who do them.

Answers

Answer:

purchasing agent: negotiate contracts with suppliers

attend conferences and trade shows to find new products

office clerk: file paperwork according to a filing system in the office

type data into software to be used by the company

freight forwarder: calculate the weight and volume of cargo

track shipments to make sure that they arrive on time

(a) List 5 keys we can type with our left hand fingers
(b) List 5 keys we can type with our right hand fingers​

Answers

Answer:

A) a,s,d,f, and either g or caps lock

B) l,k,j,h, and, ;

Explanation:

Leslie works in an SDLC team. When Leslie edits a file, it gets saved as an altered version. Later all the altered versions are combined to form the
final file. Which type of version control process does Leslie's company use?
OA.
file merging
ОВ.
file locking
Ос.
file subversion
OD.
file conversion
O E.
file diversion

Answers

Answer:

file subversion

Explanation:

File subversion is compliant with the copy-modify-and merge model. Here, users make personal working copies which they can adjust concurrently. After the adjustments, the files are merged into a final copy by the version control system or someone.

This is similar to the version control process of Leslie's company. The team members all save their altered versions of the files which are then finally merged into one final file.

Pls awnser right awnsers only

Answers

Answer:

2, 4, and 5

Explanation:

Four reasons why computers are powerful

Answers

Answer:

Computers are powerful tools because they can process information with incredible speed, accuracy and dependability. They can efficiently perform input, process, output and storage operations, and they can store massive amounts of data. ... Midrange servers are bigger and more powerful than workstation computers.

For which of the following tasks would a for-each loop be appropriate?
A. Reversing the order of the elements in an array.
B. Printing all the elements at even indices of an array.
C. Printing every element in an array.
D. Determining how many elements in an array of doubles are positive.
E. Determining whether an array of Strings is arranged in alphabetical order.
F. Printing every even number in an array of ints.

Answers

Answer:

The answer is "Option B, C,  and F".

Explanation:

In the For-each loop, it is used for traversing items in a sequence is the control flow expression. It typically required a loop becomes referred to it as an enhanced loop for iterating its array as well as the collection elements. This loop is a version shortcut that skips the need for the hasNext() method to get iterator and the loop and over an iterator, and the incorrect choice can be determined as follows:

In choice A, it is wrong because it can't reverse the array element.In choice D, it is wrong because it can't determine the array of positive.In choice E, it is wrong because it can't determine an array of the sting in alphabetical order.

The dealer's cost of a car is 85% of the listed price. The dealer would accept any offer that is at least $500 over the dealer's cost. Design an algorithm that prompts the user to input the list price of the car and print the least amount that the dealer would accept for the car.

Answers

Answer:

Explanation:

The following code is writen in Python. It is a function called minPrice. It asks the user to input the list price of the vehicle and then multiplies that by 0.85 in order to get the dealer's cost. Then it adds 500 to that price and returns it to the user as the minimum price that the dealer would accept for the car.

def minPrice():

   list_price = input("Please enter the list price of the car: ")

   dealers_cost = int(list_price) * 0.85

   min_accepted_price = dealers_cost + 500

   print(min_accepted_price)

Pls help I don’t know the answers

Answers

Answer:

1. DLL Files.

2. System software repair.

3. Software configuration.

4. Human-computer interaction.

5. A graphical user interface (GUI).

Explanation:

1. DLL Files can become lost or damaged on a computer and prevent it from working correctly. These are important registry files used by various system softwares to perform specific tasks.

2. System software repair is a type of software you can run to help fix computer problems. Some examples are disk defragmenter, regedit, etc.

3. Software configuration means the process of setting up an application and selecting specific options. This is usually done in the settings section of a software application or program.

4. Human-computer interaction is the name of the discipline concerned with the design of optimal user interfaces.

5. A graphical user interface (GUI) is what users make use of to interact with graphical icons and other visual elements in order to accomplish tasks.

True or False
4. The Timeline is a window at the bottom of the Stage which is divided into frames.​

Answers

Answer:

I think the answer is true

which of the view will show you a view very similar to the Print view​

Answers

Answer:

Print Layout view is the one most closely related to what your document will look like when you actually print it. (In some versions of Word this view may be called Page Layout view.) ... This is the viewing mode you should use if you want to always see what your document will look like.

Explanation:

I hope this helps and pls mark me brainliest :)

4. Select the correct answer.
Which file format combines different layers of information (text, images, tables, and so on) into one layer in the file?
A.
GIF
B.
PDF
C.
BMP
D.
TIFF
E.
PNG

Answers

Answer: B.  PDF

Explanation:

Portable Document Format (PDF) is such an important document that it is considered the international standard for information and document exchange. It is used for letters, resumes and even electronic contracts.

PDF was developed by Adobe to make it independent of the device or application it is being viewed on and combines layers of information into one layer thereby making it a flat document.

The third assignment involves writing a Python program to compute the cost of carpeting a room. Your program should prompt the user for the width and length in feet of the room and the quality of carpet to be used. A choice between three grades of carpeting should be given. You should decide on the price per square foot of the three grades on carpet. Your program must include a function that accepts the length, width, and carpet quality as parameters and returns the cost of carpeting that room. After calling that function, your program should then output the carpeting cost.
Your program should include the pseudocode used for your design in the comments. Document the values you chose for the prices per square foot of the three grades of carpet in your comments as well.
You are to submit your Python program as a text file (.txt) file. In addition, you are also to submit a test plan in a Word document or a .pdf file. 15% of your grade will be based on whether the comments in your program include the pseudocode and define the values of your constants, 70% on whether your program executes correctly on all test cases and 15% on the completeness of your test report.

Answers

Answer:

# price of the carpet per square foot for each quality.

carpet_prices=[1,2,4]

def cal_cost(width,height,choice):

 return width*height*carpet_prices[choice-1]  

width=int(input("Enter Width : "))

height=int(input("Enter Height : "))

print("---Select Carpet Quality---")

print("1. Standard Quality")

print("2. Primium Quality")

print("3. Premium Plus Quality")

choice=int(input("Enter your choice : "))

print(f"Carpeting cost = {cal_cost(width,height,choice)}")

Explanation:

The cal_cost function is used to return the cost of carpeting. The function accepts three arguments, width, height, and the choice of carpet quality.

The program gets the values of the width, height and choice, calls the cal_cost function, and prints out the string format of the total carpeting cost.

Write a method named countInRange that accepts three parameters: an ArrayList of integers, a minimum and maximum integer, and returns the number of elements in the list within that range inclusive. For example, if the list v contains {28, 1, 17, 4, 41, 9, 59, 8, 31, 30, 25}, the call of countInRange(v, 10, 30) should return 4. If the list is empty, return 0. Do not modify the list that is passed in.

Answers

Answer:

In Java:

The method is as follows:

public static int countInRange (ArrayList<Integer> MyList, int min, int max) {  

       int count = 0;

       for (int i = 0; i < MyList.size(); i++)  {

           if(MyList.get(i)>=min && MyList.get(i)<=max){

               count++;

           }  

       }

       return count;

 }

Explanation:

This defines the method

public static int countInRange (ArrayList<Integer> MyList, int min, int max) {

This declares and initializes count to 0  

       int count = 0;

This iterates through the ArrayList

       for (int i = 0; i < MyList.size(); i++)  {

This checks if current ArrayList element is between min and max (inclusive)

           if(MyList.get(i)>=min && MyList.get(i)<=max){

If yes, increase count by 1

               count++;

           }  

       }

This returns count

       return count;

 }

To call the method from main, use:

countInRange(v,m,n)

Where v is the name of the ArrayList, m and n are the min and max respectively.

What is an embedded computer? explanation

Answers

Answer: embedded computer

Explanation: An embedded computer is a microprocessor-based system, specially designed to perform a specific function and belong to a larger system. It comes with a combination of hardware and software to achieve a unique task and withstand different conditions.

Answer:

An embedded computer is a computer that has been built to solve only a very few specific questions and is not easily changed.it has a processor, software, input and output.examples are: calculator, digital camera, elevator, copiers, printers.

Work-based learning can be defined as educational experiences that focus on

Answers

Answer:

Work Based Learning is an educational approach or instructional methodology that uses the workplace or real work to provide students with the knowledge and skills that will help them connect school experiences to real-life work activities and future career opportunities.

Explanation:

Work Based Learning is an educational approach or instructional methodology that uses the workplace or real work to provide students with the knowledge and skills that will help them connect school experiences to real-life work activities and future career opportunities.

What is Work based learning?

The broad term "work-based learning" (WBL) is used to describe activities that involve employers and schools working together to provide students with structured learning experiences.

By giving students the chance to apply the knowledge and skills they have learned in the classroom to actual circumstances, a good WBL program can increase the relevance of school-based learning.

Both the workplace and the school support work-based learning. While work site learning takes place outside of school in a company or other community group, school-based learning concentrates on academic and career preparation as part of the classroom curriculum.

Therefore, Work Based Learning is an educational approach or instructional methodology that uses the workplace or real work to provide students with the knowledge and skills that will help them connect school experiences to real-life work activities and future career opportunities.

To learn more about Work based learning, refer to the link:

https://brainly.com/question/13597551

#SPJ2

The _____________computer function accepts data from input devices and sends it to the computer processor.

Question 9 options:

Input


Memory


Storage


RAM

Answers

Answer: input

Explanation:

The computer function that accepts data from the input devices and sends it to the computer processor is refered to as the input function.

The input device is referred to as a hardware device which is used in sending data to a computer. Some examples of input devices that we have keyboard, mouse etc.

Is this right ? Please helppppp 0111111110101011010111000010101011101010110010110101010110101110
How many nibbles are in the bit string? 5 nibbles
I
How many Bytes are in the bit string? 10 bytes
What is the bit size name for this bit string? 15/

Answers

Answer: 4054

Explanation:

i LEARND IT

Answer:

0111111110101011010111000010101011101010110010110101010110101110

How many nibbles are in the bit string? 16 nibbles

How many Bytes are in the bit string? 8 bytes

What is the bit size name for this bit string? 64

16. Select the correct answer.
Which printer translates commands from a computer to draw lines on paper using several automated pens?
A.
dye-sublimation printer
B.
plotter
C.
laser printer
D.
inkjet printer
E.
photo printe

Answers

Answer: Plotter-- B

Explanation:

A Plotter is  sophisticated  printer that get commands from a computer and interprets them to draw high quality lines or vector  graphics on paper  rather than dots using one or several automated pens. This makes them useful in the area of  CAD , architecture drawings and engineering designs. The types of plotters we have include Drum Plotters, Flat Bed Plotters and Ink Jet Plotters.

The correct option is B. Plotter.

The following information should be considered:

A Plotter is sophisticated printer that received commands from a computer and interprets them to draw high quality lines or vector  graphics on paper instead than dots using one or several automated pens. This makes them useful in the area of CAD , architecture drawings and engineering designs. The types of plotters include Drum Plotters, Flat Bed Plotters and Ink Jet Plotters.

Learn more: brainly.com/question/17429689

Write a Java program that takes as input a paragraph as a String and identifies if any of the words in the paragraph is a $1.00 word. The value of each word is calculated by adding up the value of each one of its characters. Each letter in the alphabet is worth its position in pennies i.e. a

Answers

Answer:

In Java:

import java.util.*;

public class Main{

public static void main(String[] args) {

 Scanner input = new Scanner(System.in);

 System.out.print("Enter paragraph: ");

 String para = input.nextLine();

 String[] para_words = para.split("\\s+");

 for (int i = 0; i < para_words.length; i++) {

     para_words[i] = para_words[i].replaceAll("[^\\w]", "");

     char[] eachword  = para_words[i].toCharArray();

     int penny = 0;

     for(char c : eachword){

         int value = (int)c;

         if(value<=122 && value>=97){   penny+=value-96;     }

         else if(value<=90 & value>=65){  penny+=value-64;  }

     }

     if(penny == 100){

         System.out.println(para_words[i]);

     }

       penny = 0;

}

}

}

Explanation:

Due to the length of the explanation, I've added the explanation as an attachment

Given the number of every players of two cricket team to find the winner team and find total half-century,in C program

Answers

Answer:

podrías especificarla mas por favor

True or False
3.The title tag defines a title for the page on the browser's Title bar.​

Answers

Answer:

it would be false because of the word tag you can title a browser bar tag

Explanation:

cause it would be improper

This is a Java programWrite a method with the following header to format the integer with the specified width. public String format(int number, int width) The method returns a string for the number with one or more prefix 0s. The size of the string is the width within the range 1 to 10000inclusive. For example, format(34, 4) returns 0034 and format(34,5) returns 00034. If the number is longer than the width, the method returns the string representation for the number. For example, format(34, 1) returns 34. Assume that, the size of the string is the width within the range 1 to 10000 inclusive and the number is an integer -2147483648 to 2147483648 inclusive.Input 34 4Output 0034You must use this particular Driver classclass DriverMain{public static void main(String args[]){Scanner input = new Scanner(System.in);int num = Integer.parseInt(input.nextLine().trim());int width = Integer.parseInt(input.nextLine().trim());GW6_P5 gw6P5 = new GW6_P5();System.out.print(gw6P5.format(num,width));}

Answers

Answer:

Following are the code to this question:

import java.util.*;//import package  

public class DriverMain//defining a class DriverMain

{

public static void main(String args[])//main method

{

int num,width;

Scanner input = new Scanner(System.in);//creating Scanner class fore user input

num = Integer.parseInt(input.nextLine().trim());//input value

width = Integer.parseInt(input.nextLine().trim());//input value

GW6_P5 gw6P5 = new GW6_P5();//creating base class object

System.out.print(gw6P5.format(num,width));//print method that calls base class format method

}

}

class GW6_P5 //defining base class GW6_P5

{

String format(int number, int width)//defining method format that takes two integer variable in its parameter  

{

String s = ""+number;//defining s String variable that holdes integer value

int digitCount = 0;//defining integer variable

while(number!=0) //defining while loop to check value is not equal to 0

{

digitCount++;//incrementing the integer variable value

number/=10;//holding quotient value

}

if(width>digitCount)//defining if block that checks width value greather then digitCount value  

{

for(int i=0;i<width-digitCount;i++)//defining for loop to add 0 in String variable  

{

s = "0"+s;//add value

}

}

return s;//return String value

}

}

Output:

34

5

00034

Explanation:

In the given code, a class "DriverMain" is defined, and inside the class main method is defined that defines two integer variable "num and width", that uses the scanner class to input the value, and in the next step the "GW6_P5" class object is created that calls the format method and print its values.

In the class "GW6_P5", the format method is defined, that declared the string and integer variables, in the while loop it checks number value not equal to 0, and increments the number values, and in the for loop it adds the 0 in string value and return its value.

Four reasons why computers are powerful

Answers

Answer:

You could search up almost anything you want

they have a lot of storage

you can find good information

they help you with a lot of things

Explanation:

also how they can process information in seconds

(True/False). Will this SQL statement create a table called vehicletype? CREATE TABLE vehicletype (carid PRIMARY KEY, typeofvehicle TEXT, manufacturer TEXT);

Answers

Answer:

True

Explanation:

This  SQL statement that is used to create a table called vehicletype "CREATE TABLE vehicletype (carid PRIMARY KEY, typeofvehicle TEXT, manufacturer TEXT) is a true statement.

What is the SQL statement?

An SQL is a term that connote for Structured Query Language. SQL is known to be a type of statement that is often used  to query and alter the relational databases such as SQL Server.

Conclusively, This  SQL statement that is used to create a table called vehicletype  "CREATE TABLE vehicletype (carid PRIMARY KEY, typeofvehicle TEXT, manufacturer TEXT) is a true statement becaue it is the right step to take when creating it.

Learn more about  SQL statement  from

https://brainly.com/question/27089762

Other Questions
Beth has $105 in her bank account. She buys x shirts for $5.75 each. Write and solve an equation Beth can use to find how many shirts she can buy with the money in her account. 5 points Your answer what is a cute yet interesting animal Side: BeansPrice: $1.50Your cost to make this side just becamecheaper. As a result, you are going todecrease the price by $0.25 What isthe percent of change ? Katie uses 12 cups of flour and sugar to make cookies. The amount of flour is four more than three times the amount of sugar. How many cups of flour are in this recipe? The solution is? HELP PLEASE THIS IS EASY MATH BUT I LITERALLY DONT UNDERSTAND IT 1) In 1750, which country posed the most serious threat to the English colonies in North America? 2) Which group of people did Samuel Adams create that helped build outrage among other colonists?3) Why did many colonists protest the Stamp Act?4) What reason did Parliament give for raising taxes in the colonies after 1763? 5) What is one way that Britain punished Massachusetts after the Boston Tea Party?6) What did King Georges Proclamation of 1763 do in North America? 7) What immediate action did the Second Continental Congress take as a result to the fighting at Lexington and Concord?8) What are the three main ideas in the Declaration of Independence? 9) What is the idea of natural rights? 10) According to the Declaration of Independence, the people have the right to alter or abolish a government if that government does what? 11) Which battle became a turning point of the war because it prompted the French to join the Patriots?12) When Richard Henry Lee said he was now convinced of the necessity of separation, he was describing the influence of which document that we studied? 13) Thomas Paine is known for writing which document that we studied? 14) What was a major advantage of the American side in the Revolutionary War?15) The American victory in the Revolutionary War led to what taking place around the world? 1) You will be given a document to read and answer the question Did the American Revolution Accomplish its Goals? Cubed-shaped boxes of candy are shipped in larger boxes. The larger boxes are six feet long, one foot wide, and two feet high. How many one cubic foot boxes of candy will the large box hold? Describe how you will solve the problem. Type in your answer. CO 5What is the value of tan(60)?AO12303B606 Can someone please help me with this 13. Which of the following shows the correct arrangement of thelevels of biological organization if arranged from smallest to largestgroup?a. tissue, organ, organ system, organism, cell,community, population, biosphereb. cell, tissue, organ system, organ, organism,population, community, biospheretissue, cell, organ, organ system, organism,biosphere, community, populationd. cell, tissue, organ, organ system, organism, population,community, biosphere Adult tickets to the fall play cost $6 and student tickets cost $3. The drama class sold 25 more student tickets than adult tickets to the fall play. If the class collected $660 from ticket sales, how many student tickets were sold? The drama class sold how many tickets? The solution is? The answer please answer will give brainliest Which renewable energy source is used the most throughout the world?A. solar energyB. biomassC .hydroelectricD. wind The power, P (watts), of a car engine is proportional to the square of its speed, s (m/s).When s = 35, P = 1760.Work out the power (to 1 DP) when the speed is 40 m/s What is it called when i don't care what pronouns people call me, but i care about other peoples pronouns? How does mutating the DNA affect the organism? Pls help!!1000 L of nitrogen and 2400 L of hydrogen are mixed to produce ammonia. The volume of ammonia produced isA. 1200 LB. 1000 LC. 2400 LD. 1600 L What did the giant hear when he was lying awake in bed? Please help ASAP.... three reasons Kennedy gives in his speech about how the time efforts of space research is valuable to Americans