Does anybody know why I get an error? Could you help me solve it please | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Does anybody know why I get an error? Could you help me solve it please

https://code.sololearn.com/cOMeFzfl9o4O/?ref=app

14th Oct 2020, 9:37 PM
Fernanda C. A
Fernanda C. A - avatar
4 Answers
+ 3
1) The header <conio.h> is not only outdated, but also not standard C++, and therefore unlikely to be accessible on most compilers. Same goes for getch(), since it comes from the header. 2) Spelling error on line 44, it should be printf. 3) Sometimes you try to use undefined variables, for example "xb1" on line 50. 4) Wrong operator in scanf on line 57, it should be & instead of %. 4) You keep trying to use the syntax y( some_variable ) which is not a valid operation. What exactly are you trying to accomplish with it?
14th Oct 2020, 9:48 PM
Shadow
Shadow - avatar
+ 2
Okay, so I guess you are trying to plug the variables into the 'y' function from your task then. The problem is that the 'y' from your code is just a simple variable, and the compiler doesn't know anything about the function itself, you need to define that. I would create a distinct function (you can still call it y) to calculate the result, e.g. double y( const double y ) { return ( 147 * pow( e, t ) + ... ); } To be able to use 'e' within that function, you would have to move it into the global scope though. Also, you repeat the same error for y_1 on line 47. If that is another function, you would again have to define it first.
14th Oct 2020, 10:29 PM
Shadow
Shadow - avatar
0
Elaborar un cĆ³digo en C para compilar un programa que realice el cĆ”lculo de la raĆ­z de la siguiente funciĆ³n. š‘¦(š‘”) = 147 š‘’ š‘” + 50 š‘” (š‘’ š‘” āˆ’ 1) āˆ’ 208 Esta funciĆ³n modela el crecimiento de la poblaciĆ³n de una ciudad donde incluye las defunciones y la inmigraciĆ³n anual. El programa debe calcular la raĆ­z de la funciĆ³n usando los mĆ©todos de BisecciĆ³n, Newton y Secante. La tolerancia al error porcentual debe ser menor a 0.001 Debe guiarse con el programa de la imagen que se anexa y debe hacer como mĆ­nimo lo mismo que este. Write a code in C to compile a program that performs the calculation of the root of the following function. š‘¦ (š‘”) = 147 š‘’ š‘” + fifty š‘” (š‘’ š‘” - 1) - 208 This function models the population growth of a city where it includes deaths and annual immigration. The program must calculate the root of the function using the methods of Bisection, Newton and Drying. Percentage error tolerance must be less than 0.001 It should be guided by the program of the attached image and should do at leas
14th Oct 2020, 9:52 PM
Fernanda C. A
Fernanda C. A - avatar
0
That's what they asked me
14th Oct 2020, 9:52 PM
Fernanda C. A
Fernanda C. A - avatar