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:
click on window button thought mouse or press esc and ctrl key at same time to open start menu option or to type window+r to open run dialog box
Answer: dependent
Explanation:
A Cells containing formulas which refer to other cells are known as dependents.
These are cells that depend on values in the selected cell.
A dependents cell can either contain a formula or a constant value.
(Ctrl + ] ) Is used as a shortcut when selecting dependents cells in an active cell.
Another option is to make use of you (Tools > Formula Auditing > Trace Precedents).
So, 5 is intered.
Line 1: num will recieve the integer 5
Line 2: Blank
Line 3: num will recieve 1, wich is the remainer of the division of 5 by 4.
Line 4: will return true, since num is indeed equal to 1.
Line 5: Will print "A"
Line 6: Will return false
Line 7: Gets jumped
Line 8: Will return false
Line 9: Gets jumped
Line 10: Will return false
Line 11: Gets jumped
Line 12: Will return false
Line 13: Gets jumped
The only OUTPUT is "A".