{"id":"e65018e9-8278-4dee-82b4-04269b33edf7","name":"Pattern 19","description":"1. You are given a number n.\r\n 2. You've to write code to print the pattern given in output format below","inputFormat":"A number n","outputFormat":"<img src=\"http://pepcoding.com/resources/ojquestionresource/images/pat191.JPG\" alt=\"pat191\">","constraints":"1 &lt;= n &lt;= 10\r\n Also, n is odd.","sampleCode":{"cpp":{"code":"#include <iostream>\r\nusing namespace std;\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\npublic 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":"3","sampleOutput":"*\t*\t*\t\r\n*\t*\t*\t\r\n*\t*\t*","questionVideo":"https://www.youtube.com/embed/9KlKv54QI9c","hints":[],"associated":[{"id":"09694e86-3e04-4ca4-aec5-ebbb7c71d80e","name":"(Pattern 19) What is 'First Component' out of five is representing?","slug":"pattern-19-what-is-first-component-out-of-five-is-representing","type":4},{"id":"755abba8-a432-412e-90a5-a96226201d27","name":"(Pattern 19) Choose a valid loop name in Java below:","slug":"pattern-19-choose-a-valid-loop-name-in-java-below","type":4},{"id":"7a467021-cc05-4a3a-8cf6-3fd7aade28d3","name":"(Pattern 19) Pattern can be broken into ____ components.","slug":"pattern-19-pattern-can-be-broken-into-components","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":"730ef602-11f0-4dcc-af85-3e7447b93e1f","name":"Pattern 19","slug":"pattern-19","type":1}],"next":{"id":"cc604d50-f508-41f3-a947-23f0ab129490","name":"Pattern 19","type":3,"slug":"pattern-19"},"prev":{"id":"740873be-00d7-48c5-8912-e3f98ca13ea3","name":"Pattern 18","type":3,"slug":"pattern-18"}}}

Pattern 19

1. You are given a number n. 2. You've to write code to print the pattern given in output format below

{"id":"e65018e9-8278-4dee-82b4-04269b33edf7","name":"Pattern 19","description":"1. You are given a number n.\r\n 2. You've to write code to print the pattern given in output format below","inputFormat":"A number n","outputFormat":"<img src=\"http://pepcoding.com/resources/ojquestionresource/images/pat191.JPG\" alt=\"pat191\">","constraints":"1 &lt;= n &lt;= 10\r\n Also, n is odd.","sampleCode":{"cpp":{"code":"#include <iostream>\r\nusing namespace std;\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\npublic 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":"3","sampleOutput":"*\t*\t*\t\r\n*\t*\t*\t\r\n*\t*\t*","questionVideo":"https://www.youtube.com/embed/9KlKv54QI9c","hints":[],"associated":[{"id":"09694e86-3e04-4ca4-aec5-ebbb7c71d80e","name":"(Pattern 19) What is 'First Component' out of five is representing?","slug":"pattern-19-what-is-first-component-out-of-five-is-representing","type":4},{"id":"755abba8-a432-412e-90a5-a96226201d27","name":"(Pattern 19) Choose a valid loop name in Java below:","slug":"pattern-19-choose-a-valid-loop-name-in-java-below","type":4},{"id":"7a467021-cc05-4a3a-8cf6-3fd7aade28d3","name":"(Pattern 19) Pattern can be broken into ____ components.","slug":"pattern-19-pattern-can-be-broken-into-components","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":"730ef602-11f0-4dcc-af85-3e7447b93e1f","name":"Pattern 19","slug":"pattern-19","type":1}],"next":{"id":"cc604d50-f508-41f3-a947-23f0ab129490","name":"Pattern 19","type":3,"slug":"pattern-19"},"prev":{"id":"740873be-00d7-48c5-8912-e3f98ca13ea3","name":"Pattern 18","type":3,"slug":"pattern-18"}}}
plane

Editor


Loading...

Pattern 19

easy

1. You are given a number n. 2. You've to write code to print the pattern given in output format below

Constraints

1 <= n <= 10 Also, n is odd.

Format

Input

A number n

Output

pat191

Example

Sample Input

3

Sample Output

* * * * * * * * *

Question Video

Discussions

Show Discussion

Related Resources

related resources

Turning Off Zen Mode