Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

1.

#include <iostream>
#include <fstream>
using namespace std;
ifstream fin("numere.txt");
int main()
{ int x,nr,c,aux;
while(fin>>x)
aux=x;
nr=0
{while aux=!0)
c=aux%10;
if(aux>0) nr=nr+1;
aux=aux/0}
if (nr>=10) cout<<"DA";
else cout<<"NU";
6.
#include <iostream>
using namespace std;
int main()
{intn,k;
cin>>n>>k;
while(k>0)
{cout<<n*k<<" ";
k--;}
return 0;
}
2.
#include <iostream>
#include <fstream>
using namespace std;
ifstream fin("bac.txt");
int main()
{int v[101],i,x[101],m,n,nr;
for (i = 1; i <= m; i++) fin >> v[i];
for (i = 1; i <= n; i++) fin >> x[i];
ok=1
for(i=1;i<=m;i++)
{if(v[i]==x[i]x=0;
}
if(ok==1)nr=nr+1
cout<<nr;
return 0;
}

You might also like