Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kochneva darina #82

Open
wants to merge 24 commits into
base: Kochneva_Darina
Choose a base branch
from

Conversation

CuteDarKy
Copy link

No description provided.

@@ -0,0 +1,176 @@
//Код взят у Бутусова Александра
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

мне он скоро снится будет)

13.10_Task2.cpp Outdated
return result;
}
int S(int a, int b, int c){
int result = ((a+b)*c)/2;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

а тут точно целое число будет?)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Нет, должен быть double, потому что делим. Поняла

18.12_Task1.cpp Outdated

class Pendulum{
public:
double cyclicFreq = 0;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ничего не смущает?)
Если это функция, то у нее должны быть параметры, а если нет реализации, то должно быть еще ключевое слово virtual

18.12_Task1.cpp Outdated
this->I = I;
}
double cyclicFreq override {
return cyclicFreq = paw((massa*g*length)/I, 1/2);_
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Тут аналогично)
paw - это какая-то новая функция?)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Опечатка. pow - функция нахождения степени

return oscPeriod = 2*3.14*paw(I/(massa*g*length), 1/2);
}
double type(){
cout<<"Physical pendulum"<<endl;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Почему функция имеет возвращаемое значение типа double?)
В данном случае она ничего не возвращает

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Должен быть void?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@CuteDarKy, конечно, Вы же ничего из функции не возвращаете, просто отображаете информацию на экран

temp = matrix[i][j];
matrix[i][j] = matrix[i][column - j - 1];
matrix[i][column - j - 1] = temp;
}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

} - нет закрывающей скобки
Код запускали?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Вероятно забыла. потому что торопилась отправить

cout<<s<<endl;
s += s;
}
}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Что-то пошло не так...)

void Treugol1(int h, string s){
    for(int i=1; i<=h; i++){
        for(int j=0; j<i; j++)
            cout<<s;
		cout << endl;
    }

cin>>b;
f(a, b);
return 0;
}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Тут также должны использоваться указатели

}
cout<<endl;
cout<<index<<". "<<minimum<<endl;

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Память не освобождаете

printArray(Array,size);
minimum(Array,size);
return 0;
}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Память не освобождаете

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants