0

Why it's not getting output any bugs in this

Need solution for this I can't get output for this https://code.sololearn.com/ctdr3KxIiYV7/?ref=app #include <iostream> using namespace std; int main() { double x, y size = 10; char ch = 3 string message ("#i |o√£ u") int print_line =4; if (message.length()%2!=0) message + =""; for (x=0; x<size; x++) {for(y=0; y<4 *size; y++) {double dist 1 =sqrt(pow(x-size)+ pow (y-size,2)) double dist 2 = sqrt (pow(x-size,2)+pow(y-3*size,2)); if (dist1 <size+5 || dist2<size+0.5){cout << ch; } else cout <<" ";} cout <<"\n"; } for(y=1; x<2 *size; x++) { for(y=0;y<4*size+1-2* x; y++) { if (x>=print_line-1 && x<=print_line+1) { int idx =y-(4*size-2**- message.length())/2; if(idx < message.length() && idx >=0) { if(x== print_line ) count <<message[idx]; else dout <<""; } else cout << ch; } cout << endl } } return 0; }

12th Jan 2021, 3:26 AM
Narayan Tirvir
3 Respostas
+ 5
I haven't really read the whole code in detail, but on line 28, why are there double asteriks (**) on line 33, why is there `dout` instead of `cout`? on line 6, no type declaration of 'size' on line 7 & 8, no semicolons at the end of the line on line 14 & 15, there are no functions `sqrt` and `pow`. How have you used them? Also, please refrain from pasting the program in the question body itself. Instead copy the program, make a C++ code in the code playground, paste the program there and save it. Then link the saved code here so that referencing the line numbers is easier
12th Jan 2021, 3:32 AM
XXX
XXX - avatar
0
You can't use double asterisks in c++ as we all do in Python
12th Jan 2021, 3:43 AM
Atul [Inactive]
0
XXX Martin Taylor can you please recheck & send the correct lines
21st Jan 2021, 2:42 PM
Narayan Tirvir