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 Antworten
+ 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