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:
Yes, Cross Industry Standard Process for Data Mining has six stages. Business understanding, data understanding, data preparation, modeling, evaluation, and deployment.
Explanation:
I believe the answer is modem
Not sure in what environment your asking for, but in C programming, %d is an integer (basically a number), %c is a character, that is a single alphanumeric character, where as %s is a series of alphanumeric characters, in programming %s is actually just an array of characters (so multiple %c), but don't worry about that to much.
Examples in c.
int number = 1;
char character = "c"; (numbers (integers) can be characters)
char string[5] = "abcd"; ([5] implies 5 characters, here there are 4, that is because an invisible character exists known as a "null terminator" (\0).
The cosmic horizon is what your eye allows you to see, and that is only a small fragment of the universes actual size