Skip to content

Commit 3e3fa50

Browse files
committed
Git Rocks
1 parent 188ced7 commit 3e3fa50

File tree

2 files changed

+62
-0
lines changed

2 files changed

+62
-0
lines changed

AAL/Aditya And Ladders.txt

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
Aditya is fond of ladders. Everyday he goes through pictures of ladders online but unfortunately today he ran out of ladder pictures online. Write a program to print �ladder with N steps�, which he can use to get his daily dose of ladder love.
2+
3+
INPUT:
4+
Input contains integer N, the number of steps in the ladder
5+
6+
OUTPUT:
7+
8+
Print the ladder with the gap between two side rails being 3 spaces(� �).
9+
10+
Check the sample output for format of printing the ladder.
11+
12+
CONSTRAINTS:
13+
14+
1<=N<=40
15+
16+
Sample Input : 4
17+
Sample Output:
18+
* *
19+
* *
20+
*****
21+
* *
22+
* *
23+
*****
24+
* *
25+
* *
26+
*****
27+
* *
28+
* *
29+
*****
30+
* *
31+
* *

AAL/x.cpp

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#include <iostream>
2+
3+
using namespace std;
4+
5+
int main()
6+
7+
{
8+
9+
int N,i=0;
10+
11+
cin>>N;
12+
13+
while(i<N)
14+
15+
{
16+
17+
cout<<"\n* *";
18+
19+
cout<<"\n* *";
20+
21+
cout<<"\n*****";
22+
23+
i++;
24+
25+
}
26+
27+
cout<<"\n* *";
28+
29+
cout<<"\n* *";
30+
31+
}

0 commit comments

Comments
 (0)