Delete lotto.cpp
This commit is contained in:
parent
c2fb16f50b
commit
1e45df1cd3
31
lotto.cpp
31
lotto.cpp
@ -1,31 +0,0 @@
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
int main()
|
||||
{
|
||||
|
||||
int a[] = {5, 3, 2, 2, 9, 1};
|
||||
int i,dl,n;
|
||||
dl=sizeof(a)/sizeof(a[0]);
|
||||
for(i=0;i<dl;i++)
|
||||
cout<<a[i]<<" ";
|
||||
|
||||
cout<<"\n n = ";
|
||||
cin>>n;
|
||||
int *b = new int [n];
|
||||
for(i=0;i<n;i++) {
|
||||
cout<<"b["<<i<<"]=";
|
||||
cin>>b[i];
|
||||
}
|
||||
|
||||
int k=0;
|
||||
for(i=0;i<dl;i++) {
|
||||
if(a[i]==b[0]) k++;
|
||||
}
|
||||
|
||||
cout<<"\n\t k = "<<k;
|
||||
|
||||
|
||||
system("pause > null");
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user