Right Facing Arrow in C++ / How to Tutorial

Опубликовано: 24 Май 2026
на канале: RubenOrtega
4,566
55

Right-facing arrow
Given two input integers for an arrowhead and arrow body, print a right-facing arrow. Ex: If the input is:

0 1
the output is:

1
11
00000111
000001111
00000111
11
1

Code
#include iostream
using namespace std;
int main(){
int head;
cout"enter a number"endl;
cinhead;
int body;
cinbody;

cout" "headendl;
cout" "headheadendl;
cout""bodybodybodybodybodyheadheadheadendl;
cout""bodybodybodybodybodyheadheadheadheadendl;
cout""bodybodybodybodybodheadheaheadendl;
cout" "headheadendl;
cout" "headendl;



}