SlideShare a Scribd company logo
1 of 28
#include <iostream>
#include<ctime>
using namespace std;
void MinutesHours_conversion();
void Lottery_Draw();
void Draw_SquarePattern();
void TimeConversion(int);
int main()
{
cout << "There are 4 functionality of this project.The
following list will give the options to choose for the respective
operations. Choose the correct option to proceed.Thank
You..!!!"<<endl;
int c=0;//variable to choose from the menu
while(c!=4){
cout<<"t t"<<"OPERATIONS"<<endl;
cout<<" t"<<" 1.Time conversion"<<endl;
cout<<"t 2.Print a hollow square"<<endl;
cout<<"t 3.Lottery drawing"<<endl;
cout<<"t 4.Exit";
cin>>c;
switch(c){
case 1:MinutesHours_conversion();
break;
case 2:Draw_SquarePattern();
break;
case 3:Lottery_Draw();
break;
case 4:break;
default:
cout<<"Wrong choice..!!! Please select valid options
from the menu..";
}
}
return 0;
}
void MinutesHours_conversion(){
int min;
cout<<" Time Conversion "<<endl;
cout << " Enter in minutes : ";
cin >> min;
TimeConversion(min);
}
void TimeConversion(int minute){
double j;
double m=(double) minute;
for(j=m;j<=m+20;j++){
cout<<j<<" minutes t";
cout<<j/60<<"hours";
cout<<"n";
}
}
void Draw_SquarePattern(){
int sz;
cout<<" Pattern of Hollow Square "<<endl;
cout<< "Enter size:";
cin>>sz;
for(int v=1; v<=sz; v++)
{
if(v <= 1)
for(int v=1; v<=sz; v++)
{
cout<< "#";
}
else if(v<sz)
{
cout<< endl;
for(int w=1; w<=sz; w++)
{
if(w==1 || w==sz)
cout<< "#";
else
cout<< " ";
}}
else
{
cout<< endl;
for(int x=1; x<=sz; x++)
{
cout<<"#";
}
}
}
}
void Lottery_Draw(){
// Declare Variables
int draw_ball,x,opt;
int ball_drawdrawings(int&);
// Title
cout << ' ' << endl;
cout << 't' << "Lottery Draw!" << endl;
cout << ' ' << endl;
// Call to Function
x=ball_drawdrawings(draw_ball);
// End function
}
int ball_drawdrawings(int&)
{
int draw;
double en(0), sevn(0), x_y_z(0); // The declaration of
variable are done here
double percen_en = 0.0, perc_7 = 0.0, perc_123 = 0.0;
int maxps= 1;
int count= 1;
// Input From User
cout << "Enter the number of lottery drawings that is to be
simulated ";
cin >> draw;
cout << ' ' << endl;
// Numbers randomized
srand((int)time(NULL)); // To include <ctime> header
while (count <= draw) {
for (int k=1; k<=3; k++)
{
int rounding = rand()%10+1;
cout << rounding << ' ';
if (rounding == 7) {
sevn++;
}
else
{
if ((rounding % 2) == 0) {
en++;
}
else
{
if (rounding == 1 || rounding == 2 || rounding ==
3)
{
x_y_z++;
}
}
}
}
cout << ' ' << endl;
maxps= count;
count++;
}
percen_en = (en/(draw*3.0))*100.0;
perc_7 = (sevn/(draw*3.0))*100.0;
perc_123 = (x_y_z/(draw*3.0))*100.0;
// The sreen displays the output
//The checking for precision
cout << ' ' << endl;
cout << "The three ball_draws were even " << percen_en <<
"% of the time." << endl;
cout << "The number seven appeared on one of the three
ball_draws " << perc_7 << "% of the time." << endl;
cout << "The numbers 1, 2, and 3 occured on the ball_draws
" << perc_123 << "% of the time." << endl;
cout << ' ' << endl;
return rand();
}
#include <iostream>
#include<ctime>
using namespace std;
void MinutesHours_conversion();
void Lottery_Draw();
void Draw_SquarePattern();
void TimeConversion(int);
int main()
{
cout << "There are 4 functionality of this project.The following
l
ist will give the options to choose for
the respective operations. Choose the correct option to
proceed.Thank You..!!!"<<endl;
int c=0;//variable to choose from the menu
while(c!=4){
cout<<"

t

t"<<"OPERATIONS"<<endl;
cout<<"

t"<<" 1.Time co
nversion"<<endl;
cout<<"

t 2.Print a hollow square"<<endl;
cout<<"

t 3.Lottery drawing"<<endl;
cout<<"

t 4.Exit";
cin>>c;
switch(c){
case 1:MinutesHours_conversion();
break;
case 2:Draw_SquarePattern();
break;
case 3:Lottery_Draw();
break;
case 4:break;
#include <iostream>
#include<ctime>
using namespace std;
void MinutesHours_conversion();
void Lottery_Draw();
void Draw_SquarePattern();
void TimeConversion(int);
int main()
{
cout << "There are 4 functionality of this project.The
following list will give the options to choose for
the respective operations. Choose the correct option to
proceed.Thank You..!!!"<<endl;
int c=0;//variable to choose from the menu
while(c!=4){
cout<<"t t"<<"OPERATIONS"<<endl;
cout<<" t"<<" 1.Time conversion"<<endl;
cout<<"t 2.Print a hollow square"<<endl;
cout<<"t 3.Lottery drawing"<<endl;
cout<<"t 4.Exit";
cin>>c;
switch(c){
case 1:MinutesHours_conversion();
break;
case 2:Draw_SquarePattern();
break;
case 3:Lottery_Draw();
break;
case 4:break;
Page 1 of 3
ENGR 2230 Project Report Format
Note:
The entire document should have 12-point font and single-
spaced, top, bottom, left and right
margins are all 1 inch. All pages should have a page number in
the center at the bottom except
for the title page and appendices.
All headings must be numbered, centered, bolded, and
capitalized at the beginning of the section.
There must be two spaces between the heading and the
paragraph. All subheadings should be
numbered, and left justified and single-spaced.
All figures must have a number and caption underneath, all
tables must have a number and title
above it. There should be one space between the caption and
the figure or the caption and the
table.
Remember this is only a guide of the minimum requirements of
your report. Give me any other
information that you feel is significant and aids the reader in
understanding the purpose,
procedure, and results of your project.
Required contents
1. Cover page – including course number and name, assignment
number, date due,
student’s name, professor’s name and your signature. (You must
sign the bottom of
the report on the title page confirming that all work is a product
of your efforts only)
2. Table of Contents (including page number).
3. Problem statement – Write the complete problem statement.
This should give all of
the data and information, specifications for the desired results,
a format, etc.
4. Program description
a. Overview- Describe the strategy (modularity) used to solve
the problem.
b. Variable list – Include a list of names and descriptions of
each input, output
and process variables used in your program listing.
5. Program structure
a. Describe the overall plan (module charts) of how the program
is constructed.
b. Algorithm: List all the major formulas, the theory and
explanations needed in
developing the problem solution algorithm and the computer
program. Use
pseudo codes or flow charts to describe how the program works.
6. A screen shot of Visual C++ window showing the comments
at the beginning of your
program. Must include the first line of your code. If the code is
more than one page,
print the screen shot for the first page only. (MAKE SURE it is
legible. No dark
backgrounds, and make font large)
7. Results – Show screen shots of all the results after executing
your program (if one
screen shot can not show all the results, use several screen
shots).
8. Conclusions – Discussion of the computer program and
results.
9. References – You MUST list all reference materials used
and/or related to the program.
10. Appendix – Computer Program Listing (Print directly from
Visual Studio)
Page 2 of 3
Sample of cover page for ENGR 2230
Do not include this in your report
Tennessee State University
College of Engineering, Technology, and Computer Science
Department of (your department)
ENGR 2230
ENGINEERING PROGRAMMING
PROJECT REPORT
BY
YOUR NAME
SUBMITTED TO
Mr. Waled Tayib
Report Submitted: Date
I pledge my honor that I have neither given nor received aid on
this work.
Signature: ________________________________ Date:
[Note: Please follow the format of this page exactly]
Do not include this in your report
Page 3 of 3
Sample of variable list for ENGR 2230
Do not include this in your report
Table 1. Program Variable List
Variable Name Variable Type Description
Tc double Temperature in Celsius
Tf double Temperature in Fahrenheit
[Note: Please follow the format of this page exactly]
Do not include in your report
#include <iostream>
#include<ctime>
using namespace std;
void MinutesHours();
void DrawLottery();
void SquarePattern();
void TimeConversion(int);
int main()
{
cout << "There are 4 functionality of this project.The
following list will give the options to choose for the respective
operations. Choose the correct option to proceed.Thank
You..!!!"<<endl;
int c=0;//variable to choose from the menu
while(c!=4){
cout<<"t t"<<"OPERATIONS"<<endl;
cout<<" t"<<" 1.Time conversion"<<endl;
cout<<"t 2.Print a hollow square"<<endl;
cout<<"t 3.Lottery drawing"<<endl;
cout<<"t 4.Exit";
cin>>c;
switch(c){
case 1:MinutesHours();
break;
case 2:SquarePattern();
break;
case 3:DrawLottery();
break;
case 4:break;
default:
cout<<"Wrong choice..!!! Please select valid options
from the menu..";
}
}
return 0;
}
void MinutesHours(){
int m;
cout<<" Time Conversion "<<endl;
cout << " Enter in minutes : ";
cin >> m;
TimeConversion(m);
}
void TimeConversion(int minutes){
double j;
double min=(double) minutes;
for(j=min;j<=min+20;j++){
cout<<j<<" minutes t";
cout<<j/60<<"hours";
cout<<"n";
}
}
void SquarePattern(){
int size;
cout<<" Pattern of Hollow Square "<<endl;
cout<< "Enter size:";
cin>>size;
for(int k=1; k<=size; k++)
{
if(k <= 1)
for(int k=1; k<=size; k++)
{
cout<< "#";
}
else if(k<size)
{
cout<< endl;
for(int n=1; n<=size; n++)
{
if(n==1 || n==size)
cout<< "#";
else
cout<< " ";
}}
else
{
cout<< endl;
for(int z=1; z<=size; z++)
{
cout<<"#";
}
}
}
}
void DrawLottery(){
// Declare Variables
int ball_draw,x,option;
int ball_drawdrawings(int&);
// Title
cout << ' ' << endl;
cout << 't' << "Lottery Draw!" << endl;
cout << ' ' << endl;
// Call to Function
x=ball_drawdrawings(ball_draw);
// End function
}
int ball_drawdrawings(int&)
{
int drawing;
double en(0), sevn(0), x1_y1_z1(0); // The declaration of
variable are done here
double percen_en = 0.0, percent_7 = 0.0, percent_123 = 0.0;
int maxps= 1;
int count= 1;
// Input From User
cout << "Enter the number of lottery drawings that is to be
simulated ";
cin >> drawing;
cout << ' ' << endl;
// Numbers randomized
srand((int)time(NULL)); // To include <ctime> header
while (count <= drawing) {
for (int k=1; k<=3; k++)
{
int rounding = rand()%10+1;
cout << rounding << ' ';
if (rounding == 7) {
sevn++;
}
else
{
if ((rounding % 2) == 0) {
en++;
}
else
{
if (rounding == 1 || rounding == 2 || rounding ==
3)
{
x1_y1_z1++;
}
}
}
}
cout << ' ' << endl;
maxps= count;
count++;
}
percen_en = (en/(drawing*3.0))*100.0;
percent_7 = (sevn/(drawing*3.0))*100.0;
percent_123 = (x1_y1_z1/(drawing*3.0))*100.0;
// The sreen displays the output
//The checking for precision
cout << ' ' << endl;
cout << "The three ball_draws were even " << percen_en <<
"% of the time." << endl;
cout << "The number seven appeared on one of the three
ball_draws " << percent_7 << "% of the time." << endl;
cout << "The numbers 1, 2, and 3 occured on the ball_draws
" << percent_123 << "% of the time." << endl;
cout << ' ' << endl;
return rand();
}
#include <iostream>
#include<ctime>
using namespace std;
void MinutesHours();
void DrawLottery();
void SquarePattern();
void TimeConversion(int);
int main()
{
cout << "There are 4 functionality of this project.The following
list will give the options to choose for
the respective operations. Choose the correct option to
proceed.Thank You..!!!"<<endl;
int c=0;//variable to choose from the menu
while(c!=4
){
#include <iostream>
#include<ctime>
using namespace std;
void MinutesHours();
void DrawLottery();
void SquarePattern();
void TimeConversion(int);
int main()
{
cout << "There are 4 functionality of this project.The
following list will give the options to choose for
the respective operations. Choose the correct option to
proceed.Thank You..!!!"<<endl;
int c=0;//variable to choose from the menu
while(c!=4){

More Related Content

Similar to #include iostream#includectimeusing namespace std;void.docx

Answers To Selected Exercises For Fortran 90 95 For Scientists And Engineers
Answers To Selected Exercises For Fortran 90 95 For Scientists And EngineersAnswers To Selected Exercises For Fortran 90 95 For Scientists And Engineers
Answers To Selected Exercises For Fortran 90 95 For Scientists And EngineersSheila Sinclair
 
C101-PracticeProblems.pdf
C101-PracticeProblems.pdfC101-PracticeProblems.pdf
C101-PracticeProblems.pdfT17Rockstar
 
Programming in C by SONU KUMAR.pptx
Programming in C by SONU KUMAR.pptxProgramming in C by SONU KUMAR.pptx
Programming in C by SONU KUMAR.pptxSONU KUMAR
 
OverviewThis hands-on lab allows you to follow and experiment w.docx
OverviewThis hands-on lab allows you to follow and experiment w.docxOverviewThis hands-on lab allows you to follow and experiment w.docx
OverviewThis hands-on lab allows you to follow and experiment w.docxgerardkortney
 
project report in C++ programming and SQL
project report in C++ programming and SQLproject report in C++ programming and SQL
project report in C++ programming and SQLvikram mahendra
 
CSE 103 Project Presentation.pptx
CSE 103 Project Presentation.pptxCSE 103 Project Presentation.pptx
CSE 103 Project Presentation.pptxTasnimSaimaRaita
 
Lab-11-C-Problems.pptx
Lab-11-C-Problems.pptxLab-11-C-Problems.pptx
Lab-11-C-Problems.pptxShimoFcis
 
I need help to modify my code according to the instructions- Modify th.pdf
I need help to modify my code according to the instructions- Modify th.pdfI need help to modify my code according to the instructions- Modify th.pdf
I need help to modify my code according to the instructions- Modify th.pdfpnaran46
 
Python Training in Chandigarh(Mohali)
Python Training in Chandigarh(Mohali)Python Training in Chandigarh(Mohali)
Python Training in Chandigarh(Mohali)ExcellenceAcadmy
 
Python Training Course in Chandigarh(Mohali)
Python Training Course in Chandigarh(Mohali)Python Training Course in Chandigarh(Mohali)
Python Training Course in Chandigarh(Mohali)ExcellenceAcadmy
 

Similar to #include iostream#includectimeusing namespace std;void.docx (20)

Cc code cards
Cc code cardsCc code cards
Cc code cards
 
Answers To Selected Exercises For Fortran 90 95 For Scientists And Engineers
Answers To Selected Exercises For Fortran 90 95 For Scientists And EngineersAnswers To Selected Exercises For Fortran 90 95 For Scientists And Engineers
Answers To Selected Exercises For Fortran 90 95 For Scientists And Engineers
 
lecture 2.pptx
lecture 2.pptxlecture 2.pptx
lecture 2.pptx
 
C101-PracticeProblems.pdf
C101-PracticeProblems.pdfC101-PracticeProblems.pdf
C101-PracticeProblems.pdf
 
Programming in C by SONU KUMAR.pptx
Programming in C by SONU KUMAR.pptxProgramming in C by SONU KUMAR.pptx
Programming in C by SONU KUMAR.pptx
 
LMmanual.pdf
LMmanual.pdfLMmanual.pdf
LMmanual.pdf
 
OverviewThis hands-on lab allows you to follow and experiment w.docx
OverviewThis hands-on lab allows you to follow and experiment w.docxOverviewThis hands-on lab allows you to follow and experiment w.docx
OverviewThis hands-on lab allows you to follow and experiment w.docx
 
project report in C++ programming and SQL
project report in C++ programming and SQLproject report in C++ programming and SQL
project report in C++ programming and SQL
 
CP 04.pptx
CP 04.pptxCP 04.pptx
CP 04.pptx
 
C lab-programs
C lab-programsC lab-programs
C lab-programs
 
Using matlab simulink
Using matlab simulinkUsing matlab simulink
Using matlab simulink
 
Using matlab simulink
Using matlab simulinkUsing matlab simulink
Using matlab simulink
 
CSE 103 Project Presentation.pptx
CSE 103 Project Presentation.pptxCSE 103 Project Presentation.pptx
CSE 103 Project Presentation.pptx
 
901131 examples
901131 examples901131 examples
901131 examples
 
C++
C++C++
C++
 
Lab-11-C-Problems.pptx
Lab-11-C-Problems.pptxLab-11-C-Problems.pptx
Lab-11-C-Problems.pptx
 
I need help to modify my code according to the instructions- Modify th.pdf
I need help to modify my code according to the instructions- Modify th.pdfI need help to modify my code according to the instructions- Modify th.pdf
I need help to modify my code according to the instructions- Modify th.pdf
 
Python Training in Chandigarh(Mohali)
Python Training in Chandigarh(Mohali)Python Training in Chandigarh(Mohali)
Python Training in Chandigarh(Mohali)
 
Python Training Course in Chandigarh(Mohali)
Python Training Course in Chandigarh(Mohali)Python Training Course in Chandigarh(Mohali)
Python Training Course in Chandigarh(Mohali)
 
C++ for beginners
C++ for beginnersC++ for beginners
C++ for beginners
 

More from mayank272369

NEW YORK STATE It is important to identify and develop vario.docx
NEW YORK STATE It is important to identify and develop vario.docxNEW YORK STATE It is important to identify and develop vario.docx
NEW YORK STATE It is important to identify and develop vario.docxmayank272369
 
Next, offer your perspective on transparency. In Chapter 3 of th.docx
Next, offer your perspective on transparency. In Chapter 3 of th.docxNext, offer your perspective on transparency. In Chapter 3 of th.docx
Next, offer your perspective on transparency. In Chapter 3 of th.docxmayank272369
 
New research suggests that the m ost effective executives .docx
New research suggests that the m ost effective executives .docxNew research suggests that the m ost effective executives .docx
New research suggests that the m ost effective executives .docxmayank272369
 
NewFCFF2StageTwo-Stage FCFF Discount ModelThis model is designed t.docx
NewFCFF2StageTwo-Stage FCFF Discount ModelThis model is designed t.docxNewFCFF2StageTwo-Stage FCFF Discount ModelThis model is designed t.docx
NewFCFF2StageTwo-Stage FCFF Discount ModelThis model is designed t.docxmayank272369
 
Negotiation StylesWe negotiate multiple times every day in e.docx
Negotiation StylesWe negotiate multiple times every day in e.docxNegotiation StylesWe negotiate multiple times every day in e.docx
Negotiation StylesWe negotiate multiple times every day in e.docxmayank272369
 
Neurological SystemThe nervous system is a collection of nerves .docx
Neurological SystemThe nervous system is a collection of nerves .docxNeurological SystemThe nervous system is a collection of nerves .docx
Neurological SystemThe nervous system is a collection of nerves .docxmayank272369
 
Neuroleadership is an emerging trend in the field of management..docx
Neuroleadership is an emerging trend in the field of management..docxNeuroleadership is an emerging trend in the field of management..docx
Neuroleadership is an emerging trend in the field of management..docxmayank272369
 
Network security A firewall is a network security device tha.docx
Network security A firewall is a network security device tha.docxNetwork security A firewall is a network security device tha.docx
Network security A firewall is a network security device tha.docxmayank272369
 
Network Forensics Use the Internet or the Strayer Library to.docx
Network Forensics Use the Internet or the Strayer Library to.docxNetwork Forensics Use the Internet or the Strayer Library to.docx
Network Forensics Use the Internet or the Strayer Library to.docxmayank272369
 
Negotiation Process in the International ArenaNegotiation is.docx
Negotiation Process in the International ArenaNegotiation is.docxNegotiation Process in the International ArenaNegotiation is.docx
Negotiation Process in the International ArenaNegotiation is.docxmayank272369
 
Needs to be 150 word min. Perform a scholarly search (using Pu.docx
Needs to be 150 word min. Perform a scholarly search (using Pu.docxNeeds to be 150 word min. Perform a scholarly search (using Pu.docx
Needs to be 150 word min. Perform a scholarly search (using Pu.docxmayank272369
 
Needing assistance with powerpoint presentation for Sociology in the.docx
Needing assistance with powerpoint presentation for Sociology in the.docxNeeding assistance with powerpoint presentation for Sociology in the.docx
Needing assistance with powerpoint presentation for Sociology in the.docxmayank272369
 
Need to write essay on 1000 words about Guns and Crimes , in context.docx
Need to write essay on 1000 words about Guns and Crimes , in context.docxNeed to write essay on 1000 words about Guns and Crimes , in context.docx
Need to write essay on 1000 words about Guns and Crimes , in context.docxmayank272369
 
Need Research Paper related to the course Related topic in the.docx
Need Research Paper related to the course Related topic in the.docxNeed Research Paper related to the course Related topic in the.docx
Need Research Paper related to the course Related topic in the.docxmayank272369
 
Need it in about 12 hours. There are 3 docx file each one of.docx
Need it in about 12 hours. There are 3 docx file each one of.docxNeed it in about 12 hours. There are 3 docx file each one of.docx
Need it in about 12 hours. There are 3 docx file each one of.docxmayank272369
 
Need plagiarism very important Select one type of cryptography o.docx
Need plagiarism very important Select one type of cryptography o.docxNeed plagiarism very important Select one type of cryptography o.docx
Need plagiarism very important Select one type of cryptography o.docxmayank272369
 
Need the below with in 24 hours.Provide 2 references,500 words.docx
Need the below with in 24 hours.Provide 2 references,500 words.docxNeed the below with in 24 hours.Provide 2 references,500 words.docx
Need the below with in 24 hours.Provide 2 references,500 words.docxmayank272369
 
Need it within 12-14 hours of time.One paragraph with 300 words .docx
Need it within 12-14 hours of time.One paragraph with 300 words .docxNeed it within 12-14 hours of time.One paragraph with 300 words .docx
Need it within 12-14 hours of time.One paragraph with 300 words .docxmayank272369
 
Need it to be 300 words. Two paragraphs only. What would you co.docx
Need it to be 300 words. Two paragraphs only.  What would you co.docxNeed it to be 300 words. Two paragraphs only.  What would you co.docx
Need it to be 300 words. Two paragraphs only. What would you co.docxmayank272369
 
Need it for tomorrow morning!!!!For your synthesis essay, yo.docx
Need it for tomorrow morning!!!!For your synthesis essay, yo.docxNeed it for tomorrow morning!!!!For your synthesis essay, yo.docx
Need it for tomorrow morning!!!!For your synthesis essay, yo.docxmayank272369
 

More from mayank272369 (20)

NEW YORK STATE It is important to identify and develop vario.docx
NEW YORK STATE It is important to identify and develop vario.docxNEW YORK STATE It is important to identify and develop vario.docx
NEW YORK STATE It is important to identify and develop vario.docx
 
Next, offer your perspective on transparency. In Chapter 3 of th.docx
Next, offer your perspective on transparency. In Chapter 3 of th.docxNext, offer your perspective on transparency. In Chapter 3 of th.docx
Next, offer your perspective on transparency. In Chapter 3 of th.docx
 
New research suggests that the m ost effective executives .docx
New research suggests that the m ost effective executives .docxNew research suggests that the m ost effective executives .docx
New research suggests that the m ost effective executives .docx
 
NewFCFF2StageTwo-Stage FCFF Discount ModelThis model is designed t.docx
NewFCFF2StageTwo-Stage FCFF Discount ModelThis model is designed t.docxNewFCFF2StageTwo-Stage FCFF Discount ModelThis model is designed t.docx
NewFCFF2StageTwo-Stage FCFF Discount ModelThis model is designed t.docx
 
Negotiation StylesWe negotiate multiple times every day in e.docx
Negotiation StylesWe negotiate multiple times every day in e.docxNegotiation StylesWe negotiate multiple times every day in e.docx
Negotiation StylesWe negotiate multiple times every day in e.docx
 
Neurological SystemThe nervous system is a collection of nerves .docx
Neurological SystemThe nervous system is a collection of nerves .docxNeurological SystemThe nervous system is a collection of nerves .docx
Neurological SystemThe nervous system is a collection of nerves .docx
 
Neuroleadership is an emerging trend in the field of management..docx
Neuroleadership is an emerging trend in the field of management..docxNeuroleadership is an emerging trend in the field of management..docx
Neuroleadership is an emerging trend in the field of management..docx
 
Network security A firewall is a network security device tha.docx
Network security A firewall is a network security device tha.docxNetwork security A firewall is a network security device tha.docx
Network security A firewall is a network security device tha.docx
 
Network Forensics Use the Internet or the Strayer Library to.docx
Network Forensics Use the Internet or the Strayer Library to.docxNetwork Forensics Use the Internet or the Strayer Library to.docx
Network Forensics Use the Internet or the Strayer Library to.docx
 
Negotiation Process in the International ArenaNegotiation is.docx
Negotiation Process in the International ArenaNegotiation is.docxNegotiation Process in the International ArenaNegotiation is.docx
Negotiation Process in the International ArenaNegotiation is.docx
 
Needs to be 150 word min. Perform a scholarly search (using Pu.docx
Needs to be 150 word min. Perform a scholarly search (using Pu.docxNeeds to be 150 word min. Perform a scholarly search (using Pu.docx
Needs to be 150 word min. Perform a scholarly search (using Pu.docx
 
Needing assistance with powerpoint presentation for Sociology in the.docx
Needing assistance with powerpoint presentation for Sociology in the.docxNeeding assistance with powerpoint presentation for Sociology in the.docx
Needing assistance with powerpoint presentation for Sociology in the.docx
 
Need to write essay on 1000 words about Guns and Crimes , in context.docx
Need to write essay on 1000 words about Guns and Crimes , in context.docxNeed to write essay on 1000 words about Guns and Crimes , in context.docx
Need to write essay on 1000 words about Guns and Crimes , in context.docx
 
Need Research Paper related to the course Related topic in the.docx
Need Research Paper related to the course Related topic in the.docxNeed Research Paper related to the course Related topic in the.docx
Need Research Paper related to the course Related topic in the.docx
 
Need it in about 12 hours. There are 3 docx file each one of.docx
Need it in about 12 hours. There are 3 docx file each one of.docxNeed it in about 12 hours. There are 3 docx file each one of.docx
Need it in about 12 hours. There are 3 docx file each one of.docx
 
Need plagiarism very important Select one type of cryptography o.docx
Need plagiarism very important Select one type of cryptography o.docxNeed plagiarism very important Select one type of cryptography o.docx
Need plagiarism very important Select one type of cryptography o.docx
 
Need the below with in 24 hours.Provide 2 references,500 words.docx
Need the below with in 24 hours.Provide 2 references,500 words.docxNeed the below with in 24 hours.Provide 2 references,500 words.docx
Need the below with in 24 hours.Provide 2 references,500 words.docx
 
Need it within 12-14 hours of time.One paragraph with 300 words .docx
Need it within 12-14 hours of time.One paragraph with 300 words .docxNeed it within 12-14 hours of time.One paragraph with 300 words .docx
Need it within 12-14 hours of time.One paragraph with 300 words .docx
 
Need it to be 300 words. Two paragraphs only. What would you co.docx
Need it to be 300 words. Two paragraphs only.  What would you co.docxNeed it to be 300 words. Two paragraphs only.  What would you co.docx
Need it to be 300 words. Two paragraphs only. What would you co.docx
 
Need it for tomorrow morning!!!!For your synthesis essay, yo.docx
Need it for tomorrow morning!!!!For your synthesis essay, yo.docxNeed it for tomorrow morning!!!!For your synthesis essay, yo.docx
Need it for tomorrow morning!!!!For your synthesis essay, yo.docx
 

Recently uploaded

CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxAvyJaneVismanos
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaVirag Sontakke
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting DataJhengPantaleon
 
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
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptx
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptxENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptx
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptxAnaBeatriceAblay2
 
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
 
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
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 
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
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 

Recently uploaded (20)

CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptx
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of India
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
 
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
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptx
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptxENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptx
ENGLISH5 QUARTER4 MODULE1 WEEK1-3 How Visual and Multimedia Elements.pptx
 
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
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
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
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 
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
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 

#include iostream#includectimeusing namespace std;void.docx

  • 1. #include <iostream> #include<ctime> using namespace std; void MinutesHours_conversion(); void Lottery_Draw(); void Draw_SquarePattern(); void TimeConversion(int); int main() { cout << "There are 4 functionality of this project.The following list will give the options to choose for the respective operations. Choose the correct option to proceed.Thank You..!!!"<<endl; int c=0;//variable to choose from the menu while(c!=4){ cout<<"t t"<<"OPERATIONS"<<endl; cout<<" t"<<" 1.Time conversion"<<endl; cout<<"t 2.Print a hollow square"<<endl; cout<<"t 3.Lottery drawing"<<endl; cout<<"t 4.Exit"; cin>>c; switch(c){ case 1:MinutesHours_conversion(); break; case 2:Draw_SquarePattern(); break; case 3:Lottery_Draw(); break; case 4:break; default: cout<<"Wrong choice..!!! Please select valid options from the menu..";
  • 2. } } return 0; } void MinutesHours_conversion(){ int min; cout<<" Time Conversion "<<endl; cout << " Enter in minutes : "; cin >> min; TimeConversion(min); } void TimeConversion(int minute){ double j; double m=(double) minute; for(j=m;j<=m+20;j++){ cout<<j<<" minutes t"; cout<<j/60<<"hours"; cout<<"n"; } } void Draw_SquarePattern(){ int sz; cout<<" Pattern of Hollow Square "<<endl;
  • 3. cout<< "Enter size:"; cin>>sz; for(int v=1; v<=sz; v++) { if(v <= 1) for(int v=1; v<=sz; v++) { cout<< "#"; } else if(v<sz) { cout<< endl; for(int w=1; w<=sz; w++) { if(w==1 || w==sz) cout<< "#"; else cout<< " "; }} else { cout<< endl; for(int x=1; x<=sz; x++) { cout<<"#"; } } } } void Lottery_Draw(){ // Declare Variables int draw_ball,x,opt; int ball_drawdrawings(int&);
  • 4. // Title cout << ' ' << endl; cout << 't' << "Lottery Draw!" << endl; cout << ' ' << endl; // Call to Function x=ball_drawdrawings(draw_ball); // End function } int ball_drawdrawings(int&) { int draw; double en(0), sevn(0), x_y_z(0); // The declaration of variable are done here double percen_en = 0.0, perc_7 = 0.0, perc_123 = 0.0; int maxps= 1; int count= 1; // Input From User cout << "Enter the number of lottery drawings that is to be simulated "; cin >> draw; cout << ' ' << endl; // Numbers randomized srand((int)time(NULL)); // To include <ctime> header while (count <= draw) { for (int k=1; k<=3; k++) { int rounding = rand()%10+1;
  • 5. cout << rounding << ' '; if (rounding == 7) { sevn++; } else { if ((rounding % 2) == 0) { en++; } else { if (rounding == 1 || rounding == 2 || rounding == 3) { x_y_z++; } } } } cout << ' ' << endl; maxps= count; count++; }
  • 6. percen_en = (en/(draw*3.0))*100.0; perc_7 = (sevn/(draw*3.0))*100.0; perc_123 = (x_y_z/(draw*3.0))*100.0; // The sreen displays the output //The checking for precision cout << ' ' << endl; cout << "The three ball_draws were even " << percen_en << "% of the time." << endl; cout << "The number seven appeared on one of the three ball_draws " << perc_7 << "% of the time." << endl; cout << "The numbers 1, 2, and 3 occured on the ball_draws " << perc_123 << "% of the time." << endl; cout << ' ' << endl; return rand(); } #include <iostream> #include<ctime> using namespace std; void MinutesHours_conversion(); void Lottery_Draw(); void Draw_SquarePattern(); void TimeConversion(int);
  • 7. int main() { cout << "There are 4 functionality of this project.The following l ist will give the options to choose for the respective operations. Choose the correct option to proceed.Thank You..!!!"<<endl; int c=0;//variable to choose from the menu while(c!=4){ cout<<" t t"<<"OPERATIONS"<<endl; cout<<" t"<<" 1.Time co nversion"<<endl; cout<<" t 2.Print a hollow square"<<endl;
  • 8. cout<<" t 3.Lottery drawing"<<endl; cout<<" t 4.Exit"; cin>>c; switch(c){ case 1:MinutesHours_conversion(); break; case 2:Draw_SquarePattern(); break; case 3:Lottery_Draw(); break; case 4:break;
  • 9. #include <iostream> #include<ctime> using namespace std; void MinutesHours_conversion(); void Lottery_Draw(); void Draw_SquarePattern(); void TimeConversion(int); int main() { cout << "There are 4 functionality of this project.The following list will give the options to choose for the respective operations. Choose the correct option to proceed.Thank You..!!!"<<endl; int c=0;//variable to choose from the menu while(c!=4){ cout<<"t t"<<"OPERATIONS"<<endl; cout<<" t"<<" 1.Time conversion"<<endl; cout<<"t 2.Print a hollow square"<<endl; cout<<"t 3.Lottery drawing"<<endl; cout<<"t 4.Exit"; cin>>c; switch(c){ case 1:MinutesHours_conversion(); break; case 2:Draw_SquarePattern(); break; case 3:Lottery_Draw(); break; case 4:break; Page 1 of 3
  • 10. ENGR 2230 Project Report Format Note: The entire document should have 12-point font and single- spaced, top, bottom, left and right margins are all 1 inch. All pages should have a page number in the center at the bottom except for the title page and appendices. All headings must be numbered, centered, bolded, and capitalized at the beginning of the section. There must be two spaces between the heading and the paragraph. All subheadings should be numbered, and left justified and single-spaced. All figures must have a number and caption underneath, all tables must have a number and title above it. There should be one space between the caption and the figure or the caption and the table. Remember this is only a guide of the minimum requirements of your report. Give me any other information that you feel is significant and aids the reader in understanding the purpose, procedure, and results of your project.
  • 11. Required contents 1. Cover page – including course number and name, assignment number, date due, student’s name, professor’s name and your signature. (You must sign the bottom of the report on the title page confirming that all work is a product of your efforts only) 2. Table of Contents (including page number). 3. Problem statement – Write the complete problem statement. This should give all of the data and information, specifications for the desired results, a format, etc. 4. Program description a. Overview- Describe the strategy (modularity) used to solve the problem. b. Variable list – Include a list of names and descriptions of each input, output and process variables used in your program listing. 5. Program structure a. Describe the overall plan (module charts) of how the program is constructed. b. Algorithm: List all the major formulas, the theory and explanations needed in developing the problem solution algorithm and the computer program. Use pseudo codes or flow charts to describe how the program works.
  • 12. 6. A screen shot of Visual C++ window showing the comments at the beginning of your program. Must include the first line of your code. If the code is more than one page, print the screen shot for the first page only. (MAKE SURE it is legible. No dark backgrounds, and make font large) 7. Results – Show screen shots of all the results after executing your program (if one screen shot can not show all the results, use several screen shots). 8. Conclusions – Discussion of the computer program and results. 9. References – You MUST list all reference materials used and/or related to the program. 10. Appendix – Computer Program Listing (Print directly from Visual Studio) Page 2 of 3 Sample of cover page for ENGR 2230 Do not include this in your report Tennessee State University College of Engineering, Technology, and Computer Science
  • 13. Department of (your department) ENGR 2230 ENGINEERING PROGRAMMING PROJECT REPORT BY YOUR NAME SUBMITTED TO Mr. Waled Tayib Report Submitted: Date I pledge my honor that I have neither given nor received aid on this work. Signature: ________________________________ Date:
  • 14. [Note: Please follow the format of this page exactly] Do not include this in your report Page 3 of 3 Sample of variable list for ENGR 2230 Do not include this in your report Table 1. Program Variable List Variable Name Variable Type Description Tc double Temperature in Celsius Tf double Temperature in Fahrenheit
  • 15. [Note: Please follow the format of this page exactly] Do not include in your report #include <iostream> #include<ctime> using namespace std; void MinutesHours(); void DrawLottery(); void SquarePattern();
  • 16. void TimeConversion(int); int main() { cout << "There are 4 functionality of this project.The following list will give the options to choose for the respective operations. Choose the correct option to proceed.Thank You..!!!"<<endl; int c=0;//variable to choose from the menu while(c!=4){ cout<<"t t"<<"OPERATIONS"<<endl; cout<<" t"<<" 1.Time conversion"<<endl; cout<<"t 2.Print a hollow square"<<endl; cout<<"t 3.Lottery drawing"<<endl; cout<<"t 4.Exit"; cin>>c; switch(c){ case 1:MinutesHours(); break; case 2:SquarePattern();
  • 17. break; case 3:DrawLottery(); break; case 4:break; default: cout<<"Wrong choice..!!! Please select valid options from the menu.."; } } return 0; } void MinutesHours(){ int m; cout<<" Time Conversion "<<endl;
  • 18. cout << " Enter in minutes : "; cin >> m; TimeConversion(m); } void TimeConversion(int minutes){ double j; double min=(double) minutes; for(j=min;j<=min+20;j++){ cout<<j<<" minutes t"; cout<<j/60<<"hours"; cout<<"n"; }
  • 19. } void SquarePattern(){ int size; cout<<" Pattern of Hollow Square "<<endl; cout<< "Enter size:"; cin>>size; for(int k=1; k<=size; k++) { if(k <= 1) for(int k=1; k<=size; k++) { cout<< "#"; } else if(k<size)
  • 20. { cout<< endl; for(int n=1; n<=size; n++) { if(n==1 || n==size) cout<< "#"; else cout<< " "; }} else { cout<< endl; for(int z=1; z<=size; z++) { cout<<"#"; } }
  • 21. } } void DrawLottery(){ // Declare Variables int ball_draw,x,option; int ball_drawdrawings(int&); // Title cout << ' ' << endl; cout << 't' << "Lottery Draw!" << endl; cout << ' ' << endl; // Call to Function x=ball_drawdrawings(ball_draw); // End function } int ball_drawdrawings(int&) {
  • 22. int drawing; double en(0), sevn(0), x1_y1_z1(0); // The declaration of variable are done here double percen_en = 0.0, percent_7 = 0.0, percent_123 = 0.0; int maxps= 1; int count= 1; // Input From User cout << "Enter the number of lottery drawings that is to be simulated "; cin >> drawing; cout << ' ' << endl; // Numbers randomized srand((int)time(NULL)); // To include <ctime> header while (count <= drawing) { for (int k=1; k<=3; k++)
  • 23. { int rounding = rand()%10+1; cout << rounding << ' '; if (rounding == 7) { sevn++; } else { if ((rounding % 2) == 0) {
  • 24. en++; } else { if (rounding == 1 || rounding == 2 || rounding == 3) { x1_y1_z1++; } } } } cout << ' ' << endl; maxps= count;
  • 25. count++; } percen_en = (en/(drawing*3.0))*100.0; percent_7 = (sevn/(drawing*3.0))*100.0; percent_123 = (x1_y1_z1/(drawing*3.0))*100.0; // The sreen displays the output //The checking for precision cout << ' ' << endl; cout << "The three ball_draws were even " << percen_en << "% of the time." << endl; cout << "The number seven appeared on one of the three ball_draws " << percent_7 << "% of the time." << endl; cout << "The numbers 1, 2, and 3 occured on the ball_draws " << percent_123 << "% of the time." << endl; cout << ' ' << endl;
  • 26. return rand(); } #include <iostream> #include<ctime> using namespace std; void MinutesHours(); void DrawLottery(); void SquarePattern(); void TimeConversion(int); int main()
  • 27. { cout << "There are 4 functionality of this project.The following list will give the options to choose for the respective operations. Choose the correct option to proceed.Thank You..!!!"<<endl; int c=0;//variable to choose from the menu while(c!=4 ){ #include <iostream> #include<ctime> using namespace std; void MinutesHours(); void DrawLottery(); void SquarePattern(); void TimeConversion(int);
  • 28. int main() { cout << "There are 4 functionality of this project.The following list will give the options to choose for the respective operations. Choose the correct option to proceed.Thank You..!!!"<<endl; int c=0;//variable to choose from the menu while(c!=4){