SlideShare a Scribd company logo
Week 2
PRG 218 Variables and Input and Output Operations
Write a 70- to 100-word response to the following:
Supporting Activity: Small Program
Create a small program that:
1) Prompts the user for a positive integer.
2) Prints out 0 if the number is ODD or 1 if the number is
EVEN.
Did you encounter compiler errors? How did you test your
code?
Are there multiple ways to write this program? Explain.
Supporting Activity: Code Exercise
2 Type in the code and run any 3 of the "Try It Out" exercises
in Ch. 2.
Which exercises did you select? Why? What did you learn?
3 What is the purpose of the document template in an MFC
Windows program?
5 Why do you need to be careful, and plan your program
structure in advance, when using the Application Wizard?
6 Code up the simple text editor program. Build both debug and
release versions, and examine the types and sizes of the fi les
produced in each case.
7 Generate the text editor application several times, trying diff
erent project styles from the Application Type in Application
Wizard.
8 Program Input and the Software Design Process" of
Programming and Problem Solving with C++: Comprehensive
Overtime Pay Compile Errors
Use the code in Appendix B for this assignment.
Correct the compile errors to arrive at the following output.
•Sample output:
Enter the Employee Name = Mary
Enter the hours worked = 43
Enter his or her hourly wage = 3.00
Employee Name ............. = Mary
Base Pay .................. = 120
Hours in Overtime ......... = 3
Overtime Pay Amount........ = 13.5
Total Pay.................. = 133.5
Appendix B
Overtime Pay Compile Errors
Instructions
University of Phoenix Material
Use the following code to complete your Overtime Pay Compile
Errors assignment.
#include <io>
#include <string>
#include <iomanip>
using namespace std;
//Global Declarations of Variables
double iovertime_hours=0, iovertime pay=0, iovertime_extra=0;
int ihours, iwage ;
string cname ;
int main ()
{
//Enter Employee Information
cout << "nnEnter the employee name = ";
cin >> cname ;
cout << "Enter the hours worked = "
cin >> ihours;
cout << "Enter his or her hourly wage = "
cin >> iwage
// Determine if hours are greater than 40
if (ihours < 40)
{
//Do Calculations
iovertime_hours=ihours+40;
iovertime_pay=iwage-1.5 ;
iovertime_extra=iovertime_hours*iovertime_pay;
/ Display Employee Details
cout >> "nn";
cout << "Employee Name ............. = ' << cname <<
endl ;
cout << "Base Pay .................. = " << iwage*40 <<
endl
cout << "Hours in Overtime ......... = " <<
iovertime_hours << endl ;
cout << "Overtime Pay Amout......... = " <<
iovertime_extra << endl ;
cout << Total Pay ................. = " <<
iovertime_extra+(40*iwage) << endl;
}
else // Else hours are less than 40 hours
{
cout << "nn";
cout << "Employee Name ............. = " << cname <<
endl ;
cout << Base Pay .................. = " << iwage*40 <<
endl ;
cout << "Hours in Overtime ......... = " <<
iovertime_hours << endl ;
cout << "Overtime Pay Amout......... = " <<
iovertime_extra << endl ;
cout << "Total Pay ................. = " <<
iovertime_extra+(40*iwage) << endl;
} // End of the primary if statement
} //End of Int Main
Week
2
PRG 218
Variables and Input and Output Operations
Write a
7
0
-
to 100
-
word response to the following:
Supporting Activity:
Small Program
Create
a small program that:
1)
Prompts the user for a positive integer.
2)
Prints out 0 if the
number is ODD or 1 if the number is EVEN.
Did you encounter compiler errors? How did you test your
code?
Are there multiple ways to write this program? Explain
.
Supporting Activity:
Code Exercise
2
Type
in the code and run any 3 of the "Try It Out"
exercises in Ch. 2.
Which exercises did you select? Why? What did you learn?
3
What is the purpose of the document template in an MFC
Windows program?
5
Why do you need to be careful, and plan your program structure
in advance, when using the
Application Wizard?
6
Code up the simple text editor program. Build both debug and
release versions, and examine the
types and sizes of the fi les produced in each case.
7
Generate the text editor application several times, trying diff
erent project style
s from the Application
Type in Application Wizard
.
8
Program Input and the Software Design Process" of
Programming and Problem Solving with
C++: Comprehensive
Week 2
PRG 218 Variables and Input and Output Operations
Write a 70- to 100-word response to the following:
Supporting Activity: Small Program
Create a small program that:
1) Prompts the user for a positive integer.
2) Prints out 0 if the number is ODD or 1 if the number is
EVEN.
Did you encounter compiler errors? How did you test your
code?
Are there multiple ways to write this program? Explain.
Supporting Activity: Code Exercise
2 Type in the code and run any 3 of the "Try It Out" exercises
in Ch. 2.
Which exercises did you select? Why? What did you learn?
3 What is the purpose of the document template in an MFC
Windows program?
5 Why do you need to be careful, and plan your program
structure in advance, when using the
Application Wizard?
6 Code up the simple text editor program. Build both debug and
release versions, and examine the
types and sizes of the fi les produced in each case.
7 Generate the text editor application several times, trying diff
erent project styles from the Application
Type in Application Wizard.
8 Program Input and the Software Design Process" of
Programming and Problem Solving with
C++: Comprehensive

More Related Content

Similar to Week 2PRG 218 Variables and Input and Output OperationsWrite.docx

Md university cmis 102 week 4 hands on lab new
Md university cmis 102 week 4 hands on lab newMd university cmis 102 week 4 hands on lab new
Md university cmis 102 week 4 hands on lab new
Last7693
 
Md university cmis 102 week 4 hands on lab new
Md university cmis 102 week 4 hands on lab newMd university cmis 102 week 4 hands on lab new
Md university cmis 102 week 4 hands on lab new
scottbrownnn
 
Cis 170 Extraordinary Success/newtonhelp.com
Cis 170 Extraordinary Success/newtonhelp.com  Cis 170 Extraordinary Success/newtonhelp.com
Cis 170 Extraordinary Success/newtonhelp.com
amaranthbeg143
 
Md university cmis 102 week 4 hands on lab new
Md university cmis 102 week 4 hands on lab newMd university cmis 102 week 4 hands on lab new
Md university cmis 102 week 4 hands on lab new
eyavagal
 
Cpp Homework Help
Cpp Homework Help Cpp Homework Help
Cpp Homework Help
C++ Homework Help
 
MPP-UPNVJ
MPP-UPNVJMPP-UPNVJ
Chapter 01.PPT
Chapter 01.PPTChapter 01.PPT
Chapter 01.PPT
JoeBlack136
 
Cis 170 i lab 1 of 7
Cis 170 i lab 1 of 7Cis 170 i lab 1 of 7
Cis 170 i lab 1 of 7
helpido9
 
CIS 170 Effective Communication - tutorialrank.com
CIS 170 Effective Communication - tutorialrank.comCIS 170 Effective Communication - tutorialrank.com
CIS 170 Effective Communication - tutorialrank.com
Bartholomew19
 
Cmis 102 Success Begins / snaptutorial.com
Cmis 102 Success Begins / snaptutorial.comCmis 102 Success Begins / snaptutorial.com
Cmis 102 Success Begins / snaptutorial.com
WilliamsTaylorza48
 
Cmis 102 Enthusiastic Study / snaptutorial.com
Cmis 102 Enthusiastic Study / snaptutorial.comCmis 102 Enthusiastic Study / snaptutorial.com
Cmis 102 Enthusiastic Study / snaptutorial.com
Stephenson22
 
Cis 115 Education Redefined-snaptutorial.com
Cis 115 Education Redefined-snaptutorial.comCis 115 Education Redefined-snaptutorial.com
Cis 115 Education Redefined-snaptutorial.com
robertledwes38
 
Cmis 102 Effective Communication / snaptutorial.com
Cmis 102  Effective Communication / snaptutorial.comCmis 102  Effective Communication / snaptutorial.com
Cmis 102 Effective Communication / snaptutorial.com
HarrisGeorg12
 
Python for Machine Learning
Python for Machine LearningPython for Machine Learning
Python for Machine Learning
Student
 
CIS 170 Inspiring Innovation/tutorialrank.com
 CIS 170 Inspiring Innovation/tutorialrank.com CIS 170 Inspiring Innovation/tutorialrank.com
CIS 170 Inspiring Innovation/tutorialrank.com
jonhson110
 
Mid term sem 2 1415 sol
Mid term sem 2 1415 solMid term sem 2 1415 sol
Mid term sem 2 1415 sol
IIUM
 
Comp 122 lab 4 lab report and source code
Comp 122 lab 4 lab report and source codeComp 122 lab 4 lab report and source code
Comp 122 lab 4 lab report and source code
pradesigali1
 
Devry cis-170-c-i lab-1-of-7-getting-started
Devry cis-170-c-i lab-1-of-7-getting-startedDevry cis-170-c-i lab-1-of-7-getting-started
Devry cis-170-c-i lab-1-of-7-getting-started
govendaagoovenda
 
Devry cis-170-c-i lab-1-of-7-getting-started
Devry cis-170-c-i lab-1-of-7-getting-startedDevry cis-170-c-i lab-1-of-7-getting-started
Devry cis-170-c-i lab-1-of-7-getting-started
noahjamessss
 
Cocomomodel
CocomomodelCocomomodel

Similar to Week 2PRG 218 Variables and Input and Output OperationsWrite.docx (20)

Md university cmis 102 week 4 hands on lab new
Md university cmis 102 week 4 hands on lab newMd university cmis 102 week 4 hands on lab new
Md university cmis 102 week 4 hands on lab new
 
Md university cmis 102 week 4 hands on lab new
Md university cmis 102 week 4 hands on lab newMd university cmis 102 week 4 hands on lab new
Md university cmis 102 week 4 hands on lab new
 
Cis 170 Extraordinary Success/newtonhelp.com
Cis 170 Extraordinary Success/newtonhelp.com  Cis 170 Extraordinary Success/newtonhelp.com
Cis 170 Extraordinary Success/newtonhelp.com
 
Md university cmis 102 week 4 hands on lab new
Md university cmis 102 week 4 hands on lab newMd university cmis 102 week 4 hands on lab new
Md university cmis 102 week 4 hands on lab new
 
Cpp Homework Help
Cpp Homework Help Cpp Homework Help
Cpp Homework Help
 
MPP-UPNVJ
MPP-UPNVJMPP-UPNVJ
MPP-UPNVJ
 
Chapter 01.PPT
Chapter 01.PPTChapter 01.PPT
Chapter 01.PPT
 
Cis 170 i lab 1 of 7
Cis 170 i lab 1 of 7Cis 170 i lab 1 of 7
Cis 170 i lab 1 of 7
 
CIS 170 Effective Communication - tutorialrank.com
CIS 170 Effective Communication - tutorialrank.comCIS 170 Effective Communication - tutorialrank.com
CIS 170 Effective Communication - tutorialrank.com
 
Cmis 102 Success Begins / snaptutorial.com
Cmis 102 Success Begins / snaptutorial.comCmis 102 Success Begins / snaptutorial.com
Cmis 102 Success Begins / snaptutorial.com
 
Cmis 102 Enthusiastic Study / snaptutorial.com
Cmis 102 Enthusiastic Study / snaptutorial.comCmis 102 Enthusiastic Study / snaptutorial.com
Cmis 102 Enthusiastic Study / snaptutorial.com
 
Cis 115 Education Redefined-snaptutorial.com
Cis 115 Education Redefined-snaptutorial.comCis 115 Education Redefined-snaptutorial.com
Cis 115 Education Redefined-snaptutorial.com
 
Cmis 102 Effective Communication / snaptutorial.com
Cmis 102  Effective Communication / snaptutorial.comCmis 102  Effective Communication / snaptutorial.com
Cmis 102 Effective Communication / snaptutorial.com
 
Python for Machine Learning
Python for Machine LearningPython for Machine Learning
Python for Machine Learning
 
CIS 170 Inspiring Innovation/tutorialrank.com
 CIS 170 Inspiring Innovation/tutorialrank.com CIS 170 Inspiring Innovation/tutorialrank.com
CIS 170 Inspiring Innovation/tutorialrank.com
 
Mid term sem 2 1415 sol
Mid term sem 2 1415 solMid term sem 2 1415 sol
Mid term sem 2 1415 sol
 
Comp 122 lab 4 lab report and source code
Comp 122 lab 4 lab report and source codeComp 122 lab 4 lab report and source code
Comp 122 lab 4 lab report and source code
 
Devry cis-170-c-i lab-1-of-7-getting-started
Devry cis-170-c-i lab-1-of-7-getting-startedDevry cis-170-c-i lab-1-of-7-getting-started
Devry cis-170-c-i lab-1-of-7-getting-started
 
Devry cis-170-c-i lab-1-of-7-getting-started
Devry cis-170-c-i lab-1-of-7-getting-startedDevry cis-170-c-i lab-1-of-7-getting-started
Devry cis-170-c-i lab-1-of-7-getting-started
 
Cocomomodel
CocomomodelCocomomodel
Cocomomodel
 

More from melbruce90096

`Do assignments as detailed outNO WIKI for referncesPlease m.docx
`Do assignments as detailed outNO WIKI for referncesPlease m.docx`Do assignments as detailed outNO WIKI for referncesPlease m.docx
`Do assignments as detailed outNO WIKI for referncesPlease m.docx
melbruce90096
 
_____1.On July 9, Sheb Company sells goods on credit to .docx
_____1.On July 9, Sheb Company sells goods on credit to .docx_____1.On July 9, Sheb Company sells goods on credit to .docx
_____1.On July 9, Sheb Company sells goods on credit to .docx
melbruce90096
 
[removed]eltomate  Son rojos y se sirven (they are serv.docx
[removed]eltomate  Son rojos y se sirven (they are serv.docx[removed]eltomate  Son rojos y se sirven (they are serv.docx
[removed]eltomate  Son rojos y se sirven (they are serv.docx
melbruce90096
 
[u07d2] Unit 7 Discussion 2Conflict and ChangeResourcesDiscuss.docx
[u07d2] Unit 7 Discussion 2Conflict and ChangeResourcesDiscuss.docx[u07d2] Unit 7 Discussion 2Conflict and ChangeResourcesDiscuss.docx
[u07d2] Unit 7 Discussion 2Conflict and ChangeResourcesDiscuss.docx
melbruce90096
 
[removed]1.Which of the following processes addresses when to sp.docx
[removed]1.Which of the following processes addresses when to sp.docx[removed]1.Which of the following processes addresses when to sp.docx
[removed]1.Which of the following processes addresses when to sp.docx
melbruce90096
 
Your paper should be a literary essay in which you present a combina.docx
Your paper should be a literary essay in which you present a combina.docxYour paper should be a literary essay in which you present a combina.docx
Your paper should be a literary essay in which you present a combina.docx
melbruce90096
 
[removed]1.Photographs are an important source of data because t.docx
[removed]1.Photographs are an important source of data because t.docx[removed]1.Photographs are an important source of data because t.docx
[removed]1.Photographs are an important source of data because t.docx
melbruce90096
 
Your paper should address the following questionsWhen you hear th.docx
Your paper should address the following questionsWhen you hear th.docxYour paper should address the following questionsWhen you hear th.docx
Your paper should address the following questionsWhen you hear th.docx
melbruce90096
 
Your Final Project from this course will enable you to compare cultu.docx
Your Final Project from this course will enable you to compare cultu.docxYour Final Project from this course will enable you to compare cultu.docx
Your Final Project from this course will enable you to compare cultu.docx
melbruce90096
 
Your Final Paper is to be a comprehensive research study on one of t.docx
Your Final Paper is to be a comprehensive research study on one of t.docxYour Final Paper is to be a comprehensive research study on one of t.docx
Your Final Paper is to be a comprehensive research study on one of t.docx
melbruce90096
 
Your director is not aware of the involvement of the Department of H.docx
Your director is not aware of the involvement of the Department of H.docxYour director is not aware of the involvement of the Department of H.docx
Your director is not aware of the involvement of the Department of H.docx
melbruce90096
 
YOull need to know The purpose of this research is to focus atte.docx
YOull need to know The purpose of this research is to focus atte.docxYOull need to know The purpose of this research is to focus atte.docx
YOull need to know The purpose of this research is to focus atte.docx
melbruce90096
 
Your draft should establish and develop a single thesis [or co.docx
Your draft should establish and develop a single thesis [or co.docxYour draft should establish and develop a single thesis [or co.docx
Your draft should establish and develop a single thesis [or co.docx
melbruce90096
 
Your company has just hired your foreign friend to work in a middle-.docx
Your company has just hired your foreign friend to work in a middle-.docxYour company has just hired your foreign friend to work in a middle-.docx
Your company has just hired your foreign friend to work in a middle-.docx
melbruce90096
 
Your boss has asked you to write a Project Management Plan. Your pla.docx
Your boss has asked you to write a Project Management Plan. Your pla.docxYour boss has asked you to write a Project Management Plan. Your pla.docx
Your boss has asked you to write a Project Management Plan. Your pla.docx
melbruce90096
 
Your boss has chosen you to give a presentation to a number of forei.docx
Your boss has chosen you to give a presentation to a number of forei.docxYour boss has chosen you to give a presentation to a number of forei.docx
Your boss has chosen you to give a presentation to a number of forei.docx
melbruce90096
 
your assignment is to submit a presentation on Native-American liter.docx
your assignment is to submit a presentation on Native-American liter.docxyour assignment is to submit a presentation on Native-American liter.docx
your assignment is to submit a presentation on Native-American liter.docx
melbruce90096
 
Your assignment is to report on TWO cultural experience visits y.docx
Your assignment is to report on TWO cultural experience visits y.docxYour assignment is to report on TWO cultural experience visits y.docx
Your assignment is to report on TWO cultural experience visits y.docx
melbruce90096
 
your article must be a research article You can tell it is a researc.docx
your article must be a research article You can tell it is a researc.docxyour article must be a research article You can tell it is a researc.docx
your article must be a research article You can tell it is a researc.docx
melbruce90096
 
Your administrator has come to you for information for a present.docx
Your administrator has come to you for information for a present.docxYour administrator has come to you for information for a present.docx
Your administrator has come to you for information for a present.docx
melbruce90096
 

More from melbruce90096 (20)

`Do assignments as detailed outNO WIKI for referncesPlease m.docx
`Do assignments as detailed outNO WIKI for referncesPlease m.docx`Do assignments as detailed outNO WIKI for referncesPlease m.docx
`Do assignments as detailed outNO WIKI for referncesPlease m.docx
 
_____1.On July 9, Sheb Company sells goods on credit to .docx
_____1.On July 9, Sheb Company sells goods on credit to .docx_____1.On July 9, Sheb Company sells goods on credit to .docx
_____1.On July 9, Sheb Company sells goods on credit to .docx
 
[removed]eltomate  Son rojos y se sirven (they are serv.docx
[removed]eltomate  Son rojos y se sirven (they are serv.docx[removed]eltomate  Son rojos y se sirven (they are serv.docx
[removed]eltomate  Son rojos y se sirven (they are serv.docx
 
[u07d2] Unit 7 Discussion 2Conflict and ChangeResourcesDiscuss.docx
[u07d2] Unit 7 Discussion 2Conflict and ChangeResourcesDiscuss.docx[u07d2] Unit 7 Discussion 2Conflict and ChangeResourcesDiscuss.docx
[u07d2] Unit 7 Discussion 2Conflict and ChangeResourcesDiscuss.docx
 
[removed]1.Which of the following processes addresses when to sp.docx
[removed]1.Which of the following processes addresses when to sp.docx[removed]1.Which of the following processes addresses when to sp.docx
[removed]1.Which of the following processes addresses when to sp.docx
 
Your paper should be a literary essay in which you present a combina.docx
Your paper should be a literary essay in which you present a combina.docxYour paper should be a literary essay in which you present a combina.docx
Your paper should be a literary essay in which you present a combina.docx
 
[removed]1.Photographs are an important source of data because t.docx
[removed]1.Photographs are an important source of data because t.docx[removed]1.Photographs are an important source of data because t.docx
[removed]1.Photographs are an important source of data because t.docx
 
Your paper should address the following questionsWhen you hear th.docx
Your paper should address the following questionsWhen you hear th.docxYour paper should address the following questionsWhen you hear th.docx
Your paper should address the following questionsWhen you hear th.docx
 
Your Final Project from this course will enable you to compare cultu.docx
Your Final Project from this course will enable you to compare cultu.docxYour Final Project from this course will enable you to compare cultu.docx
Your Final Project from this course will enable you to compare cultu.docx
 
Your Final Paper is to be a comprehensive research study on one of t.docx
Your Final Paper is to be a comprehensive research study on one of t.docxYour Final Paper is to be a comprehensive research study on one of t.docx
Your Final Paper is to be a comprehensive research study on one of t.docx
 
Your director is not aware of the involvement of the Department of H.docx
Your director is not aware of the involvement of the Department of H.docxYour director is not aware of the involvement of the Department of H.docx
Your director is not aware of the involvement of the Department of H.docx
 
YOull need to know The purpose of this research is to focus atte.docx
YOull need to know The purpose of this research is to focus atte.docxYOull need to know The purpose of this research is to focus atte.docx
YOull need to know The purpose of this research is to focus atte.docx
 
Your draft should establish and develop a single thesis [or co.docx
Your draft should establish and develop a single thesis [or co.docxYour draft should establish and develop a single thesis [or co.docx
Your draft should establish and develop a single thesis [or co.docx
 
Your company has just hired your foreign friend to work in a middle-.docx
Your company has just hired your foreign friend to work in a middle-.docxYour company has just hired your foreign friend to work in a middle-.docx
Your company has just hired your foreign friend to work in a middle-.docx
 
Your boss has asked you to write a Project Management Plan. Your pla.docx
Your boss has asked you to write a Project Management Plan. Your pla.docxYour boss has asked you to write a Project Management Plan. Your pla.docx
Your boss has asked you to write a Project Management Plan. Your pla.docx
 
Your boss has chosen you to give a presentation to a number of forei.docx
Your boss has chosen you to give a presentation to a number of forei.docxYour boss has chosen you to give a presentation to a number of forei.docx
Your boss has chosen you to give a presentation to a number of forei.docx
 
your assignment is to submit a presentation on Native-American liter.docx
your assignment is to submit a presentation on Native-American liter.docxyour assignment is to submit a presentation on Native-American liter.docx
your assignment is to submit a presentation on Native-American liter.docx
 
Your assignment is to report on TWO cultural experience visits y.docx
Your assignment is to report on TWO cultural experience visits y.docxYour assignment is to report on TWO cultural experience visits y.docx
Your assignment is to report on TWO cultural experience visits y.docx
 
your article must be a research article You can tell it is a researc.docx
your article must be a research article You can tell it is a researc.docxyour article must be a research article You can tell it is a researc.docx
your article must be a research article You can tell it is a researc.docx
 
Your administrator has come to you for information for a present.docx
Your administrator has come to you for information for a present.docxYour administrator has come to you for information for a present.docx
Your administrator has come to you for information for a present.docx
 

Recently uploaded

The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
heathfieldcps1
 
How to Create a More Engaging and Human Online Learning Experience
How to Create a More Engaging and Human Online Learning Experience How to Create a More Engaging and Human Online Learning Experience
How to Create a More Engaging and Human Online Learning Experience
Wahiba Chair Training & Consulting
 
Mule event processing models | MuleSoft Mysore Meetup #47
Mule event processing models | MuleSoft Mysore Meetup #47Mule event processing models | MuleSoft Mysore Meetup #47
Mule event processing models | MuleSoft Mysore Meetup #47
MysoreMuleSoftMeetup
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
Priyankaranawat4
 
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptxBeyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
EduSkills OECD
 
How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17
Celine George
 
IGCSE Biology Chapter 14- Reproduction in Plants.pdf
IGCSE Biology Chapter 14- Reproduction in Plants.pdfIGCSE Biology Chapter 14- Reproduction in Plants.pdf
IGCSE Biology Chapter 14- Reproduction in Plants.pdf
Amin Marwan
 
How to deliver Powerpoint Presentations.pptx
How to deliver Powerpoint  Presentations.pptxHow to deliver Powerpoint  Presentations.pptx
How to deliver Powerpoint Presentations.pptx
HajraNaeem15
 
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
สมใจ จันสุกสี
 
Bed Making ( Introduction, Purpose, Types, Articles, Scientific principles, N...
Bed Making ( Introduction, Purpose, Types, Articles, Scientific principles, N...Bed Making ( Introduction, Purpose, Types, Articles, Scientific principles, N...
Bed Making ( Introduction, Purpose, Types, Articles, Scientific principles, N...
Leena Ghag-Sakpal
 
Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...
PsychoTech Services
 
Leveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit InnovationLeveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit Innovation
TechSoup
 
A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
Jean Carlos Nunes Paixão
 
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptxPengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Fajar Baskoro
 
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptxChapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Denish Jangid
 
clinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdfclinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdf
Priyankaranawat4
 
BBR 2024 Summer Sessions Interview Training
BBR  2024 Summer Sessions Interview TrainingBBR  2024 Summer Sessions Interview Training
BBR 2024 Summer Sessions Interview Training
Katrina Pritchard
 
ZK on Polkadot zero knowledge proofs - sub0.pptx
ZK on Polkadot zero knowledge proofs - sub0.pptxZK on Polkadot zero knowledge proofs - sub0.pptx
ZK on Polkadot zero knowledge proofs - sub0.pptx
dot55audits
 
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptxC1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
mulvey2
 
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
Nguyen Thanh Tu Collection
 

Recently uploaded (20)

The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
 
How to Create a More Engaging and Human Online Learning Experience
How to Create a More Engaging and Human Online Learning Experience How to Create a More Engaging and Human Online Learning Experience
How to Create a More Engaging and Human Online Learning Experience
 
Mule event processing models | MuleSoft Mysore Meetup #47
Mule event processing models | MuleSoft Mysore Meetup #47Mule event processing models | MuleSoft Mysore Meetup #47
Mule event processing models | MuleSoft Mysore Meetup #47
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
 
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptxBeyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
 
How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17
 
IGCSE Biology Chapter 14- Reproduction in Plants.pdf
IGCSE Biology Chapter 14- Reproduction in Plants.pdfIGCSE Biology Chapter 14- Reproduction in Plants.pdf
IGCSE Biology Chapter 14- Reproduction in Plants.pdf
 
How to deliver Powerpoint Presentations.pptx
How to deliver Powerpoint  Presentations.pptxHow to deliver Powerpoint  Presentations.pptx
How to deliver Powerpoint Presentations.pptx
 
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
 
Bed Making ( Introduction, Purpose, Types, Articles, Scientific principles, N...
Bed Making ( Introduction, Purpose, Types, Articles, Scientific principles, N...Bed Making ( Introduction, Purpose, Types, Articles, Scientific principles, N...
Bed Making ( Introduction, Purpose, Types, Articles, Scientific principles, N...
 
Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...
 
Leveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit InnovationLeveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit Innovation
 
A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
 
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptxPengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptx
 
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptxChapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptx
 
clinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdfclinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdf
 
BBR 2024 Summer Sessions Interview Training
BBR  2024 Summer Sessions Interview TrainingBBR  2024 Summer Sessions Interview Training
BBR 2024 Summer Sessions Interview Training
 
ZK on Polkadot zero knowledge proofs - sub0.pptx
ZK on Polkadot zero knowledge proofs - sub0.pptxZK on Polkadot zero knowledge proofs - sub0.pptx
ZK on Polkadot zero knowledge proofs - sub0.pptx
 
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptxC1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
 
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
BÀI TẬP DẠY THÊM TIẾNG ANH LỚP 7 CẢ NĂM FRIENDS PLUS SÁCH CHÂN TRỜI SÁNG TẠO ...
 

Week 2PRG 218 Variables and Input and Output OperationsWrite.docx

  • 1. Week 2 PRG 218 Variables and Input and Output Operations Write a 70- to 100-word response to the following: Supporting Activity: Small Program Create a small program that: 1) Prompts the user for a positive integer. 2) Prints out 0 if the number is ODD or 1 if the number is EVEN. Did you encounter compiler errors? How did you test your code? Are there multiple ways to write this program? Explain. Supporting Activity: Code Exercise 2 Type in the code and run any 3 of the "Try It Out" exercises in Ch. 2. Which exercises did you select? Why? What did you learn? 3 What is the purpose of the document template in an MFC Windows program? 5 Why do you need to be careful, and plan your program structure in advance, when using the Application Wizard? 6 Code up the simple text editor program. Build both debug and release versions, and examine the types and sizes of the fi les produced in each case. 7 Generate the text editor application several times, trying diff erent project styles from the Application Type in Application Wizard. 8 Program Input and the Software Design Process" of Programming and Problem Solving with C++: Comprehensive
  • 2. Overtime Pay Compile Errors Use the code in Appendix B for this assignment. Correct the compile errors to arrive at the following output. •Sample output: Enter the Employee Name = Mary Enter the hours worked = 43 Enter his or her hourly wage = 3.00 Employee Name ............. = Mary Base Pay .................. = 120 Hours in Overtime ......... = 3 Overtime Pay Amount........ = 13.5 Total Pay.................. = 133.5
  • 3. Appendix B Overtime Pay Compile Errors Instructions University of Phoenix Material Use the following code to complete your Overtime Pay Compile Errors assignment. #include <io> #include <string>
  • 4. #include <iomanip> using namespace std; //Global Declarations of Variables double iovertime_hours=0, iovertime pay=0, iovertime_extra=0; int ihours, iwage ; string cname ; int main () { //Enter Employee Information cout << "nnEnter the employee name = "; cin >> cname ; cout << "Enter the hours worked = " cin >> ihours; cout << "Enter his or her hourly wage = " cin >> iwage // Determine if hours are greater than 40 if (ihours < 40) { //Do Calculations iovertime_hours=ihours+40; iovertime_pay=iwage-1.5 ; iovertime_extra=iovertime_hours*iovertime_pay; / Display Employee Details cout >> "nn"; cout << "Employee Name ............. = ' << cname << endl ; cout << "Base Pay .................. = " << iwage*40 << endl cout << "Hours in Overtime ......... = " << iovertime_hours << endl ; cout << "Overtime Pay Amout......... = " <<
  • 5. iovertime_extra << endl ; cout << Total Pay ................. = " << iovertime_extra+(40*iwage) << endl; } else // Else hours are less than 40 hours { cout << "nn"; cout << "Employee Name ............. = " << cname << endl ; cout << Base Pay .................. = " << iwage*40 << endl ; cout << "Hours in Overtime ......... = " << iovertime_hours << endl ; cout << "Overtime Pay Amout......... = " << iovertime_extra << endl ; cout << "Total Pay ................. = " << iovertime_extra+(40*iwage) << endl; } // End of the primary if statement } //End of Int Main Week 2 PRG 218 Variables and Input and Output Operations Write a 7 0 - to 100 - word response to the following:
  • 6. Supporting Activity: Small Program Create a small program that: 1) Prompts the user for a positive integer. 2) Prints out 0 if the number is ODD or 1 if the number is EVEN. Did you encounter compiler errors? How did you test your code? Are there multiple ways to write this program? Explain . Supporting Activity: Code Exercise 2 Type in the code and run any 3 of the "Try It Out" exercises in Ch. 2. Which exercises did you select? Why? What did you learn?
  • 7. 3 What is the purpose of the document template in an MFC Windows program? 5 Why do you need to be careful, and plan your program structure in advance, when using the Application Wizard? 6 Code up the simple text editor program. Build both debug and release versions, and examine the types and sizes of the fi les produced in each case. 7 Generate the text editor application several times, trying diff erent project style s from the Application Type in Application Wizard . 8 Program Input and the Software Design Process" of Programming and Problem Solving with C++: Comprehensive
  • 8. Week 2 PRG 218 Variables and Input and Output Operations Write a 70- to 100-word response to the following: Supporting Activity: Small Program Create a small program that: 1) Prompts the user for a positive integer. 2) Prints out 0 if the number is ODD or 1 if the number is EVEN. Did you encounter compiler errors? How did you test your code? Are there multiple ways to write this program? Explain. Supporting Activity: Code Exercise 2 Type in the code and run any 3 of the "Try It Out" exercises in Ch. 2. Which exercises did you select? Why? What did you learn? 3 What is the purpose of the document template in an MFC Windows program? 5 Why do you need to be careful, and plan your program structure in advance, when using the Application Wizard? 6 Code up the simple text editor program. Build both debug and release versions, and examine the types and sizes of the fi les produced in each case.
  • 9. 7 Generate the text editor application several times, trying diff erent project styles from the Application Type in Application Wizard. 8 Program Input and the Software Design Process" of Programming and Problem Solving with C++: Comprehensive