#include <iostream>
#include <iostream>
#include <iostream>
#include <time.h>
#include <time.h>
using namespace std;
void Randmass(int**,int,int,int);
void Printmass(int**,int);
int main() {
int n,first_value, last_value;
cout<<"vvedite diapazon"<<endl;
cin>>first_value>>last_value;
srand(time(0));
cout<<"vvedite razm matrivy"<<endl;cin>>n;
int matrix[n][n]={0};
int *stroki[n];
for (int i=0;i<0;i++)stroki[i] = &matrix[i][0];
Randmass(stroki,n,first_value,last_value);
cout<<endl;
Printmass(stroki,n);
int summa = Sum(stroki,n);
cout<<endl<<"summa pol chisel"<<summa<<endl;
}
void Randmass(int** mass,int sizematr,int first_value,int last_value)
{
cout<<"Initzialisaziya"<<sizematr<<endl;
for (int i = 0 ;i<sizematr; i++){
for (int j = 0 ;j<sizematr; j++){
mass[i][j] = first_value + rand()%(last_value - first_value +1);
}
}
}
void Printmass(int** mass,int sizematr)
{
for (int i = 0; i<sizematr; i++){
for (int j = 0 ;j<sizematr; j++){
cout<<endl;
for (int j = 0 ;j<sizematr; j++){
cout<<"\t"<<mass[i][j];
}
}
}
}
int Sum(int**x,int n)
{
int s=0; first = 0
result = {}
for(int i=0;i<n;i++)
for(int j=0;j<n;j++)
{
while(x[i][j>0)
{
first=x[i][j]%10;
x[i][j=x[i][j]/10;
}
}
return s;
}
int iValue = 8776892;
std::cout << "Source number : " << iValue << std::endl;
for(int iv2 = iValue; iv2 != 0; iValue = iv2, iv2 = iValue / 10);
std::cout << "First number digit : " << iValue << std::endl;
if (iValue == 7)
std::cout << "SEVEN !!!!" << std::endl;
else
std::cout << "NOT SEVEN !!!" << std::endl;