diff --git a/hackerrank/10_printing_patterns_using_loop.c b/hackerrank/10_printing_patterns_using_loop.c new file mode 100644 index 0000000..2ff7dd4 --- /dev/null +++ b/hackerrank/10_printing_patterns_using_loop.c @@ -0,0 +1,22 @@ +#include +#include +#include +#include + +int main() +{ + + int n; + scanf("%d", &n); + int len = n*2 - 1; + for(int i=0;i