diff --git a/Web/1010varun_varunagarwal_2125csai1023_2/Pattern/pattern_4.py b/Web/1010varun_varunagarwal_2125csai1023_2/Pattern/pattern_4.py new file mode 100644 index 00000000..1c8f08ff --- /dev/null +++ b/Web/1010varun_varunagarwal_2125csai1023_2/Pattern/pattern_4.py @@ -0,0 +1,8 @@ +n = int(input()) +j = 0 +for i in range(n, 0, -1): + print(" "*j, end = "") + print("* "*i, end = "") + j += 1 + print() + \ No newline at end of file diff --git a/Web/1010varun_varunagarwal_2125csai1023_2/Pattern/pattern_5.py b/Web/1010varun_varunagarwal_2125csai1023_2/Pattern/pattern_5.py new file mode 100644 index 00000000..dfa1a9d1 --- /dev/null +++ b/Web/1010varun_varunagarwal_2125csai1023_2/Pattern/pattern_5.py @@ -0,0 +1,5 @@ +n = int(input()) +print("*") +for i in range(1, n): + print(" "*i, end = "") + print("*") \ No newline at end of file diff --git a/Web/1010varun_varunagarwal_2125csai1023_2/Pattern/pattern_6.py b/Web/1010varun_varunagarwal_2125csai1023_2/Pattern/pattern_6.py new file mode 100644 index 00000000..60b51aab --- /dev/null +++ b/Web/1010varun_varunagarwal_2125csai1023_2/Pattern/pattern_6.py @@ -0,0 +1,5 @@ +n = int(input()) +for i in range(n-1, 0, -1): + print(" "*i, end = "") + print("*") +print("*") \ No newline at end of file diff --git a/Web/1010varun_varunagarwal_2125csai1023_2/Pattern/pattern_7.cpp b/Web/1010varun_varunagarwal_2125csai1023_2/Pattern/pattern_7.cpp new file mode 100644 index 00000000..21ee9891 --- /dev/null +++ b/Web/1010varun_varunagarwal_2125csai1023_2/Pattern/pattern_7.cpp @@ -0,0 +1,13 @@ +#include +using namespace std; +int main() { + int n, k = 1; + cin >> n; + for(int i = 0; i <= n; i++){ + for(int j = 0; j < i; j++){ + printf("%d ", k); + k ++; + } + cout << endl; + } +} diff --git a/Web/1010varun_varunagarwal_2125csai1023_2/Pattern/pattern_8.cpp b/Web/1010varun_varunagarwal_2125csai1023_2/Pattern/pattern_8.cpp new file mode 100644 index 00000000..c0fc4854 --- /dev/null +++ b/Web/1010varun_varunagarwal_2125csai1023_2/Pattern/pattern_8.cpp @@ -0,0 +1,9 @@ +#include +using namespace std; +int main(){ + int n; + cin >> n; + for(int i = 1; i <= 10; i++){ + cout << n << " * " << i << " = " << n*i << endl; + } +} \ No newline at end of file