-
Notifications
You must be signed in to change notification settings - Fork 26
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
base: Kochneva_Darina
Are you sure you want to change the base?
Kochneva darina #82
Conversation
@@ -0,0 +1,176 @@ | |||
//Код взят у Бутусова Александра |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
а тут точно целое число будет?)
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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);_ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Тут аналогично)
paw - это какая-то новая функция?)
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Почему функция имеет возвращаемое значение типа double?)
В данном случае она ничего не возвращает
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Должен быть void?
There was a problem hiding this comment.
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; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
} - нет закрывающей скобки
Код запускали?
There was a problem hiding this comment.
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; | ||
} | ||
} |
There was a problem hiding this comment.
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; | ||
} |
There was a problem hiding this comment.
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; | ||
|
There was a problem hiding this comment.
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; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Память не освобождаете
No description provided.