Похожие чаты

Hi In this code, do-while doesn't work, I expect to see

at least 3 cycle to achieve the root but it shows me only one number which is the final answer, what's the problem?

13 ответов

10 просмотров
Paria.-Z Автор вопроса

https://pastebin.com/EkubSa2h

Paria. Z
https://pastebin.com/EkubSa2h

Another unrelated tip, you have constants, it's better to initialize them as you declare them, and mark as const. Like const double k1 = 30.0;

Paria. Z
https://pastebin.com/EkubSa2h

Forget about my first comment (that I deleted), I've misread your loop code

Paria.-Z Автор вопроса
Pavel
Another unrelated tip, you have constants, it's be...

Thx But actually the issue is not about the constants It is about the do-while loop

Paria. Z
Thx But actually the issue is not about the consta...

Yeah, I'm trying to read it right now, but it's rather complex to decouple it's logic. Have you tried to use a debugger to execute it step-by-step? If I were you that what I would do in the first place

Paria.-Z Автор вопроса
Pavel
Yeah, I'm trying to read it right now, but it's ra...

Thx, Yes I'm Using codeblocks but it didn't show any error The result is correct without Using the loop🤔 I mean it sounds that the loop is not used for calculating the root🤔

Paria.-Z Автор вопроса
Paria. Z
Thx, Yes I'm Using codeblocks but it didn't show a...

Not sure if we're talking about the same thing. From 2:38 https://youtu.be/Jab1qj_QR8s

Paria.-Z Автор вопроса
Pavel
Not sure if we're talking about the same thing. Fr...

Thx, I thought you meant the compiling error😅

Paria. Z
Thx, I thought you meant the compiling error😅

It might be not the best video (grabbed the first from google), but the debugger tool itself is very useful, so I suggest to try it to understand what happening with your code.

Paria.-Z Автор вопроса
Pavel
It might be not the best video (grabbed the first ...

Actually I didn't get What is the difference between debugging a program and the errors which are showed when we compile it

Paria.-Z Автор вопроса
Paria. Z
Actually I didn't get What is the difference betwe...

Because when I order to compile the program it shows me if there is any syntax error, command error and so on

Paria. Z
Because when I order to compile the program it sho...

Yes, and debugging is for other purposes. It is for investigating your compiled program (that already doesn't contain these syntax errors and compiled to machine code) to see its state during some steps of execution.

Похожие вопросы

Обсуждают сегодня

This is a question from my wife who make a fortune with memes 😂😂 About the Migration and Tokens: 1. How will the old tokens be migrated to the new $LGCYX network? What is th...
🍿 °anton°
2
30500 за редактор? )
Владимир
47
а через ESC-код ?
Alexey Kulakov
29
Anyone knows where there are some instructions or discort about failed bridge transactions ?
Jochem
21
есть ПО, которое лежит папкой, по сути и не инсталится, а просто запускается. Надо раскидать по машинам в домене. Я так понял, что прям настройками GPO, копировать я смогу тол...
Dmitriy
8
any reference of this implementation?
BitBuddha
29
Чёт не понял, я ж правильной функцией воспользовался чтобы вывести отладочную информацию? но что-то она не ловится
notme
18
Привет)) уже кажется эту тему перемусолили, но вот я так и не понял. Я сейчас сижу на 27дюймов 2к мониторе. На Актуальной макоси, если я куплю 27д 4к монитор: - будет ли изобр...
Vladislav Piskunov
16
Добрый день! Скажите пожалуйста, а какие программы вы бы рекомендовали написать для того, чтобы научиться управлять памятью? Можно написать динамический массив, можно связный ...
Филипп
7
Also, why can’t the community have a vote/ say when it comes to initiatives like buybacks. Isn’t the point of crypto decentralisation? Don’t we deserve input as long term supp...
👨🏽‍🦰
13
Карта сайта