help in Chicano culture
#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){