SlideShare a Scribd company logo
1 of 9
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 newLast7693
 
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 newscottbrownnn
 
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 neweyavagal
 
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 7helpido9
 
CIS 170 Effective Communication - tutorialrank.com
CIS 170 Effective Communication - tutorialrank.comCIS 170 Effective Communication - tutorialrank.com
CIS 170 Effective Communication - tutorialrank.comBartholomew19
 
Cmis 102 Enthusiastic Study / snaptutorial.com
Cmis 102 Enthusiastic Study / snaptutorial.comCmis 102 Enthusiastic Study / snaptutorial.com
Cmis 102 Enthusiastic Study / snaptutorial.comStephenson22
 
Cmis 102 Success Begins / snaptutorial.com
Cmis 102 Success Begins / snaptutorial.comCmis 102 Success Begins / snaptutorial.com
Cmis 102 Success Begins / snaptutorial.comWilliamsTaylorza48
 
Cis 115 Education Redefined-snaptutorial.com
Cis 115 Education Redefined-snaptutorial.comCis 115 Education Redefined-snaptutorial.com
Cis 115 Education Redefined-snaptutorial.comrobertledwes38
 
Cmis 102 Effective Communication / snaptutorial.com
Cmis 102  Effective Communication / snaptutorial.comCmis 102  Effective Communication / snaptutorial.com
Cmis 102 Effective Communication / snaptutorial.comHarrisGeorg12
 
Python for Machine Learning
Python for Machine LearningPython for Machine Learning
Python for Machine LearningStudent
 
CIS 170 Inspiring Innovation/tutorialrank.com
 CIS 170 Inspiring Innovation/tutorialrank.com CIS 170 Inspiring Innovation/tutorialrank.com
CIS 170 Inspiring Innovation/tutorialrank.comjonhson110
 
Mid term sem 2 1415 sol
Mid term sem 2 1415 solMid term sem 2 1415 sol
Mid term sem 2 1415 solIIUM
 
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 codepradesigali1
 
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-startednoahjamessss
 
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-startedgovendaagoovenda
 

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 Enthusiastic Study / snaptutorial.com
Cmis 102 Enthusiastic Study / snaptutorial.comCmis 102 Enthusiastic Study / snaptutorial.com
Cmis 102 Enthusiastic Study / snaptutorial.com
 
Cmis 102 Success Begins / snaptutorial.com
Cmis 102 Success Begins / snaptutorial.comCmis 102 Success Begins / snaptutorial.com
Cmis 102 Success Begins / 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.docxmelbruce90096
 
_____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 .docxmelbruce90096
 
[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.docxmelbruce90096
 
[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.docxmelbruce90096
 
[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.docxmelbruce90096
 
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.docxmelbruce90096
 
[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.docxmelbruce90096
 
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.docxmelbruce90096
 
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.docxmelbruce90096
 
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.docxmelbruce90096
 
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.docxmelbruce90096
 
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.docxmelbruce90096
 
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.docxmelbruce90096
 
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-.docxmelbruce90096
 
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.docxmelbruce90096
 
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.docxmelbruce90096
 
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.docxmelbruce90096
 
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.docxmelbruce90096
 
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.docxmelbruce90096
 
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.docxmelbruce90096
 

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

Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsKarinaGenton
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfakmcokerachita
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 

Recently uploaded (20)

Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its Characteristics
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdf
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 

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