-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Create Hello World.txt Code for printing hello world * print Z.cpp * pattern
- Loading branch information
1 parent
d76f31d
commit a9ef7f7
Showing
3 changed files
with
71 additions
and
0 deletions.
There are no files selected for viewing
18 changes: 18 additions & 0 deletions
18
AR-VR/Shubhipandey21_ShubhiPandey_2125csit1169_2/patterns/pattern1.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#include <iostream> | ||
using namespace std; | ||
|
||
int main(int argc, char **argv){ | ||
int n; | ||
cin >> n; | ||
for(int i = 1; i <= n; ++i) | ||
{ | ||
for(int j = 1; j <= i; ++j) | ||
{ | ||
cout << "* "; | ||
cout<<"\t"; | ||
} | ||
cout << "\n"; | ||
} | ||
//write your code here | ||
|
||
} |
16 changes: 16 additions & 0 deletions
16
AR-VR/Shubhipandey21_ShubhiPandey_2125csit1169_2/patterns/pattern2.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#include <iostream> | ||
using namespace std; | ||
|
||
int main(int argc, char **argv){ | ||
int n; | ||
cin >> n; | ||
for(int i = n; i >= 1; --i) | ||
{ | ||
for(int j = 1; j <= i; ++j) | ||
{ | ||
cout << "*\t"; | ||
} | ||
cout << endl; | ||
} | ||
|
||
} |
37 changes: 37 additions & 0 deletions
37
AR-VR/Shubhipandey21_ShubhiPandey_2125csit1169_2/patterns/pattern3.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#include <iostream> | ||
using namespace std; | ||
|
||
void pypart2(int n) | ||
{ | ||
int i = 0, j = 0, k = 0; | ||
while (i < n) { | ||
|
||
|
||
while (k < (n - i - 1)) { | ||
cout << " \t"; | ||
k++; | ||
} | ||
|
||
|
||
k = 0; | ||
while (j <= i) { | ||
cout << "*\t "; | ||
j++; | ||
} | ||
|
||
|
||
j = 0; | ||
i++; | ||
cout << endl; | ||
} | ||
} | ||
|
||
|
||
int main() | ||
{ | ||
int n = 5; | ||
|
||
|
||
pypart2(n); | ||
return 0; | ||
} |