Question: what wrong of this code? #include using namespace std; int main ( ) { / / variable declaration for the tail and head of the
what wrong of this code?
#include
using namespace std;
int main
variable declaration for the tail and head of the arrow
int baseChar;
int headChar;
accepting first integer value as base character for the tail of the arrow
cin baseChar;
accepting second integer value as base character for head of the arrow
cin headChar;
main loop that iterates times
for int x ; x ; x
if x
loop for printing the space in the upper part of the arrow
for int y ; y ; y
condition for printing the space in first two rows
if x x
cout ;
condition for printing the first base character for the tail of the arrow
else
cout baseChar;
condition for printing the first base character for the head of the arrow
for int y ; y x; y
cout headChar;
condition for printing the space in the lower part of the arrow
else
loop for printing the space in the lower part of the arrow
for int y ; y ; y
condition for printing the space at the th and th row along the tail of the arrow
if x x
cout ;
condition for printing the first base character in the lower part of the arrow along the tail
else
cout baseChar;
loop for printing the head character
for int y ; y x ; y
cout headChar;
cout endl;
return ;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
