Answer:
#include <bits/stdc++.h>
using namespace std;
void LotheryPrinter(int number[])
{
int a=1000;
srand(time(0));//for generating different number on each program execution..
while(a>50)
{
a=rand();//generating lottery number between 1 to 50...
}
cout<<a<<endl;//printing the lottery number..
bool lottery=false;
for(int i=0;i<6;i++)
{
if(number[i]==a)//finding that user has won the lottery or not..
{
cout<<"You have won the lottery"<<endl;
lottery=true;
break;
}
}
if(!lottery)
cout<<"Sorry try other time"<<endl;
}
int main() {
int number[6];//array of integers of size 6..
cout<<"Choose 6 numbers between 1 to 50"<<endl;
for(int i=0;i<6;i++)
cin>>number[i];
LotheryPrinter(number);//calling the function..
return 0;
}
Output:-
Choose 6 numbers between 1 to 50
5 20 12 45 10 36
33
Sorry try other time
Explanation:
I have created a function called LotheryPrinter to generate a lottery number and and then matching the lottery number with the numbers entered by the user and all the number are between 1 to 50.
Answer:
Gives a clear structure for storing data
Explanation:
XML provide files that are clear to read and simple to produce, data are stored in form of text and in turn it is used as a transfer mechanism that defines how the structure or model should look like. XML is also usually described as a format that describes itself, and it is easy to learn and use.
They should use a spreadsheet.
Explanation:
With a spreadsheet all they will need to do is to give formula to the cells and any time they key in the expenses and revenue figures they are going to get their profit for the quarter.
It is more convenient and reliable. It reliefs the user of computation issues.
It is the last one retention because writing it out will cause it to stick in your brain better