Здравствуйте! У меня просьба посоветовать как исправить прогу чтобы откомпилировать ее и запустить. Программку мне сделали, поэтому сам я ей ничего немогу сделать. Код програмы:
#include <iostream.h>
#include <stdfx.h>
#include <time.h>
using namespace std;
int main()
{
clock_t end;
int m[100][100], kol=0, n[100], n1[100], a=0;
bool tru=falce;
cout<<"Vvedite matrizu"<<endl;
for(int i=0; i<10;i++)
for (int j=0;j<10;j++)
cin>>m[i][j];
for(int i=0; i<10;i++){
for(int j=o;j<10;j++){
{if(m[i][j]<0)
kol=kol+1;
if(m[i][j]==0)
tru=true;}
}
if(tru=true)
{
n[a]=kol;
kol=0;
n1[a]=i;
tru=falce;
a=a+1;
}
}
end=clock();
float t=end;
cout<<"vremya rabotu algoritma="<<t<<endl;
for(int i=0;i<a;i++){
cout<<"kolichestvo elementov v stroke"<<n1[]<<ravno"<<n[i]<<endl;}
return 0;
}
Всем понимающим и сочувствующим заранее огромное спасибо! ХХсессия-что поделаешХХ
#include <iostream.h>
#include <stdfx.h>
#include <time.h>
using namespace std;
int main()
{
clock_t end;
int m[100][100], kol=0, n[100], n1[100], a=0;
bool tru=falce;
cout<<"Vvedite matrizu"<<endl;
for(int i=0; i<10;i++)
for (int j=0;j<10;j++)
cin>>m[i][j];
for(int i=0; i<10;i++){
for(int j=o;j<10;j++){
{if(m[i][j]<0)
kol=kol+1;
if(m[i][j]==0)
tru=true;}
}
if(tru=true)
{
n[a]=kol;
kol=0;
n1[a]=i;
tru=falce;
a=a+1;
}
}
end=clock();
float t=end;
cout<<"vremya rabotu algoritma="<<t<<endl;
for(int i=0;i<a;i++){
cout<<"kolichestvo elementov v stroke"<<n1[]<<ravno"<<n[i]<<endl;}
return 0;
}
Всем понимающим и сочувствующим заранее огромное спасибо! ХХсессия-что поделаешХХ