{"id":"c83ef7e6-e68a-4374-93ba-6f34dc643d0c","name":"Pattern 8","description":"1. You are given a number n.\r\n2. You've to create a pattern of * and separated by tab as shown in output format.","inputFormat":"A number n","outputFormat":"<img src=\"http://pepcoding.com/resources/ojquestionresource/images/pat81.JPG\" alt=\"pat81\">","constraints":"1 &lt;= n &lt;= 100","sampleCode":{"cpp":{"code":"#include <iostream>\r\nusing namespace std;\r\n\r\nint main(int argc, char **argv)\r\n{\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":"*\t\r\n\t\t\t*\t\t\r\n\t\t*\t\t\t\r\n\t*\t\t\t\t\r\n*","questionVideo":"https://www.youtube.com/embed/f5DrvVWSDgY","hints":[],"associated":[{"id":"05ff07a2-9858-4b66-a761-23e4717c849e","name":"Which of the following is not used for looping (pattern 8)","slug":"which-of-the-following-is-not-used-for-looping-pattern-8","type":4},{"id":"9577662d-bd53-4760-967b-d83a3f5e7514","name":"What will be output of following code (pattern 8)?","slug":"what-will-be-output-of-following-code-pattern-8","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":"86385bef-9d85-4435-b5d8-fc242d6aa9cf","name":"Pattern 8","slug":"pattern-8","type":1}],"next":{"id":"2ef5b522-3d1d-4ac3-b78d-95ff71d1f389","name":"Pattern 8","type":3,"slug":"pattern-8"},"prev":{"id":"fc8eedc0-d2fa-4e75-a46b-91f857969df0","name":"Pattern 7","type":3,"slug":"pattern-7"}}}

Pattern 8

1. You are given a number n. 2. You've to create a pattern of * and separated by tab as shown in output format.

{"id":"c83ef7e6-e68a-4374-93ba-6f34dc643d0c","name":"Pattern 8","description":"1. You are given a number n.\r\n2. You've to create a pattern of * and separated by tab as shown in output format.","inputFormat":"A number n","outputFormat":"<img src=\"http://pepcoding.com/resources/ojquestionresource/images/pat81.JPG\" alt=\"pat81\">","constraints":"1 &lt;= n &lt;= 100","sampleCode":{"cpp":{"code":"#include <iostream>\r\nusing namespace std;\r\n\r\nint main(int argc, char **argv)\r\n{\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":"*\t\r\n\t\t\t*\t\t\r\n\t\t*\t\t\t\r\n\t*\t\t\t\t\r\n*","questionVideo":"https://www.youtube.com/embed/f5DrvVWSDgY","hints":[],"associated":[{"id":"05ff07a2-9858-4b66-a761-23e4717c849e","name":"Which of the following is not used for looping (pattern 8)","slug":"which-of-the-following-is-not-used-for-looping-pattern-8","type":4},{"id":"9577662d-bd53-4760-967b-d83a3f5e7514","name":"What will be output of following code (pattern 8)?","slug":"what-will-be-output-of-following-code-pattern-8","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":"86385bef-9d85-4435-b5d8-fc242d6aa9cf","name":"Pattern 8","slug":"pattern-8","type":1}],"next":{"id":"2ef5b522-3d1d-4ac3-b78d-95ff71d1f389","name":"Pattern 8","type":3,"slug":"pattern-8"},"prev":{"id":"fc8eedc0-d2fa-4e75-a46b-91f857969df0","name":"Pattern 7","type":3,"slug":"pattern-7"}}}
plane

Editor


Loading...

Pattern 8

easy

1. You are given a number n. 2. You've to create a pattern of * and separated by tab as shown in output format.

Constraints

1 <= n <= 100

Format

Input

A number n

Output

pat81

Example

Sample Input

5

Sample Output

* * * * *

Question Video

Discussions

Show Discussion

Related Resources

related resources

Turning Off Zen Mode