Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <algorithm>
- #include <iomanip>
- #include <cstdlib>
- #include <cmath>
- #include <string>
- using namespace std;
- int main()
- {
- //cout<<fixed<<setprecision(x);
- int n,m,x;
- bool check=false;
- cin>>n>>m;
- int arr[n][m];
- for (int i=0;i<n;i++)
- {
- for (int j=0;j<m;j++)
- {
- cin>>arr[i][j];
- }
- }
- cin>>x;
- for (int k=n-1;k<n;k++)
- {
- for (int t=0;t<m;t++)
- {
- if (x==arr[k][t])
- {
- check=true;
- }
- }
- }
- if (check==true)
- {
- cout<<"will not take number";
- }
- else
- {
- cout<<"will take number";
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment