`{"id":"3dbc203d-eac1-4627-b822-95a7bf9cb113","name":"Pattern 11","description":"<p>1. You are given a number n. 2. You've to create a pattern as shown in output format.</p>","inputFormat":"A number n","outputFormat":"<img src=\"http://pepcoding.com/resources/ojquestionresource/images/pat111.JPG\" alt=\"pat111\">","constraints":"1 &lt;= n &lt;= 44","sampleCode":{"cpp":{"code":"#include <iostream>\r\nusing namespace std;\r\n\r\nint main(int argc, char **argv){\r\n int n;\r\n cin >> n;\r\n \r\n //write your code here\r\n \r\n}"},"java":{"code":"import java.util.*;\r\n\r\npublic class Main {\r\n\r\n public static void main(String[] args) {\r\n Scanner scn = new Scanner(System.in);\r\n\r\n // write ur code here\r\n\r\n }\r\n}"},"python":{"code":"n = int(input())\n#write your code here"}},"points":10,"difficulty":"easy","sampleInput":"5","sampleOutput":"1\t\r\n2\t3\t\r\n4\t5\t6\t\r\n7\t8\t9\t10\t\r\n11\t12\t13\t14\t15","questionVideo":"https://www.youtube.com/embed/1AELjQJeeOw","hints":[],"associated":[{"id":"77f73b6f-5872-403e-ab71-ea9772929efa","name":"What kind of variation is seen in number of spaces in this pattern 11 ?","slug":"what-kind-of-variation-is-seen-in-number-of-spaces-in-this-pattern-11","type":4},{"id":"abb9fab7-64c5-472d-b03b-9ddd8a98bb21","name":"What is the correct order of printing this pattern 11?","slug":"what-is-the-correct-order-of-printing-this-pattern-11","type":4},{"id":"d0a965a5-f006-4f62-ac85-f8667be43c49","name":"what will be the range of the inner loop for this pattern? (pattern 11)","slug":"what-will-be-the-range-of-the-inner-loop-for-this-pattern-pattern-11","type":4},{"id":"fbb66ead-63e7-45c9-af28-f8dda03fffb8","name":"how many numbers will be printed in the n-1th row according to the pattern? (pattern 11)","slug":"how-many-numbers-will-be-printed-in-the-n-1th-row-according-to-the-pattern-pattern-11","type":4}],"solutionSeen":false,"tags":[],"meta":{"path":[{"id":0,"name":"home"},{"id":"0c54b191-7b99-4f2c-acb3-e7f2ec748b2a","name":"Data Structures and Algorithms","slug":"data-structures-and-algorithms","type":0},{"id":"ca241a91-e685-4c63-9d83-892cf12c5576","name":"Patterns","slug":"patterns-9997","type":0},{"id":"9687fa7f-dba6-4c41-bef3-ccb3f0099b2b","name":"Pattern 11","slug":"pattern-11","type":1}],"next":{"id":"90a1ca86-436f-4d55-befe-126b006f09c4","name":"Pattern 11","type":3,"slug":"pattern-11"},"prev":{"id":"800a8209-4537-4dfa-90e5-7cdaa2107fa2","name":"Pattern 10","type":3,"slug":"pattern-10"}}}`

Pattern 11

<p>1. You are given a number n. 2. You've to create a pattern as shown in output format.</p>

`{"id":"3dbc203d-eac1-4627-b822-95a7bf9cb113","name":"Pattern 11","description":"<p>1. You are given a number n. 2. You've to create a pattern as shown in output format.</p>","inputFormat":"A number n","outputFormat":"<img src=\"http://pepcoding.com/resources/ojquestionresource/images/pat111.JPG\" alt=\"pat111\">","constraints":"1 &lt;= n &lt;= 44","sampleCode":{"cpp":{"code":"#include <iostream>\r\nusing namespace std;\r\n\r\nint main(int argc, char **argv){\r\n int n;\r\n cin >> n;\r\n \r\n //write your code here\r\n \r\n}"},"java":{"code":"import java.util.*;\r\n\r\npublic class Main {\r\n\r\n public static void main(String[] args) {\r\n Scanner scn = new Scanner(System.in);\r\n\r\n // write ur code here\r\n\r\n }\r\n}"},"python":{"code":"n = int(input())\n#write your code here"}},"points":10,"difficulty":"easy","sampleInput":"5","sampleOutput":"1\t\r\n2\t3\t\r\n4\t5\t6\t\r\n7\t8\t9\t10\t\r\n11\t12\t13\t14\t15","questionVideo":"https://www.youtube.com/embed/1AELjQJeeOw","hints":[],"associated":[{"id":"77f73b6f-5872-403e-ab71-ea9772929efa","name":"What kind of variation is seen in number of spaces in this pattern 11 ?","slug":"what-kind-of-variation-is-seen-in-number-of-spaces-in-this-pattern-11","type":4},{"id":"abb9fab7-64c5-472d-b03b-9ddd8a98bb21","name":"What is the correct order of printing this pattern 11?","slug":"what-is-the-correct-order-of-printing-this-pattern-11","type":4},{"id":"d0a965a5-f006-4f62-ac85-f8667be43c49","name":"what will be the range of the inner loop for this pattern? (pattern 11)","slug":"what-will-be-the-range-of-the-inner-loop-for-this-pattern-pattern-11","type":4},{"id":"fbb66ead-63e7-45c9-af28-f8dda03fffb8","name":"how many numbers will be printed in the n-1th row according to the pattern? (pattern 11)","slug":"how-many-numbers-will-be-printed-in-the-n-1th-row-according-to-the-pattern-pattern-11","type":4}],"solutionSeen":false,"tags":[],"meta":{"path":[{"id":0,"name":"home"},{"id":"0c54b191-7b99-4f2c-acb3-e7f2ec748b2a","name":"Data Structures and Algorithms","slug":"data-structures-and-algorithms","type":0},{"id":"ca241a91-e685-4c63-9d83-892cf12c5576","name":"Patterns","slug":"patterns-9997","type":0},{"id":"9687fa7f-dba6-4c41-bef3-ccb3f0099b2b","name":"Pattern 11","slug":"pattern-11","type":1}],"next":{"id":"90a1ca86-436f-4d55-befe-126b006f09c4","name":"Pattern 11","type":3,"slug":"pattern-11"},"prev":{"id":"800a8209-4537-4dfa-90e5-7cdaa2107fa2","name":"Pattern 10","type":3,"slug":"pattern-10"}}}`

Editor

Pattern 11

easy

1. You are given a number n. 2. You've to create a pattern as shown in output format.

1 <= n <= 44

A number n

Example

Sample Input

`.css-23h8hz{color:inherit;font-size:0.875rem;line-height:1.125rem;letter-spacing:0.016rem;font-weight:var(--chakra-fontWeights-normal);white-space:pre-wrap;}5`

Sample Output

```.css-3oaykw{color:var(--chakra-colors-active-primary);font-size:0.875rem;line-height:1.125rem;letter-spacing:0.016rem;font-weight:var(--chakra-fontWeights-normal);white-space:pre-wrap;font-family:Monospace;}1 2 3 4 5 6 7 8 9 10 11 12 13 14 15```

Question Video

Discussions

Show Discussion

Related Resources