{"id":"ecf7c9dc-61df-407b-a938-cdc41df574e1","name":"Pattern 14","description":"<p>1. You are given a number n. 2. You've to write code to print it's multiplication table up to 10 in format given below.</p>","inputFormat":"A number x","outputFormat":"<img src=\"http://pepcoding.com/resources/ojquestionresource/images/pat141.JPG\" alt=\"pat141\">","constraints":"1 &lt;= n &lt;= 10","sampleCode":{"cpp":{"code":"#include<iostream>\r\nusing namespace std;\r\nint main(int agrc, 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 math\r\n n=int(input())\r\n# write your code here"},"python":{"code":"n=int(input())"}},"points":10,"difficulty":"easy","sampleInput":"3","sampleOutput":"3 * 1 = 3\r\n3 * 2 = 6\r\n3 * 3 = 9\r\n3 * 4 = 12\r\n3 * 5 = 15\r\n3 * 6 = 18\r\n3 * 7 = 21\r\n3 * 8 = 24\r\n3 * 9 = 27\r\n3 * 10 = 30","questionVideo":"https://www.youtube.com/embed/uPBV9nTNLW0","hints":[],"associated":[{"id":"6fb2ae91-00a8-47cd-91ff-3c8db207d3d6","name":"(Pattern 14) What is the time complexity of printing this pattern?","slug":"pattern-14-what-is-the-time-complexity-of-printing-this-pattern","type":4},{"id":"be4ab102-4901-4be6-ae32-70f09ba2addb","name":"(Pattern 14) Can we use while loop instead of for Loop?","slug":"pattern-14-can-we-use-while-loop-instead-of-for-loop","type":4},{"id":"d9549c1a-3434-4497-83d3-423fd72f3220","name":"(Pattern 14) Using while loop instead of forLoop reduces the time complexity ?","slug":"pattern-14-using-while-loop-instead-of-forloop-reduces-the-time-complexity","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":"81c15a38-ca2f-48c6-b185-797a59ef8a7d","name":"Pattern 14","slug":"pattern-14","type":1}],"next":{"id":"a7495587-ee4c-484c-9a71-fb266f96a04a","name":"Pattern 14","type":3,"slug":"pattern-14"},"prev":{"id":"83c921b0-020c-4a72-925d-bb8a5a1fcf81","name":"Pattern 13","type":3,"slug":"pattern-13"}}}

Pattern 14

<p>1. You are given a number n. 2. You've to write code to print it's multiplication table up to 10 in format given below.</p>

{"id":"ecf7c9dc-61df-407b-a938-cdc41df574e1","name":"Pattern 14","description":"<p>1. You are given a number n. 2. You've to write code to print it's multiplication table up to 10 in format given below.</p>","inputFormat":"A number x","outputFormat":"<img src=\"http://pepcoding.com/resources/ojquestionresource/images/pat141.JPG\" alt=\"pat141\">","constraints":"1 &lt;= n &lt;= 10","sampleCode":{"cpp":{"code":"#include<iostream>\r\nusing namespace std;\r\nint main(int agrc, 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 math\r\n n=int(input())\r\n# write your code here"},"python":{"code":"n=int(input())"}},"points":10,"difficulty":"easy","sampleInput":"3","sampleOutput":"3 * 1 = 3\r\n3 * 2 = 6\r\n3 * 3 = 9\r\n3 * 4 = 12\r\n3 * 5 = 15\r\n3 * 6 = 18\r\n3 * 7 = 21\r\n3 * 8 = 24\r\n3 * 9 = 27\r\n3 * 10 = 30","questionVideo":"https://www.youtube.com/embed/uPBV9nTNLW0","hints":[],"associated":[{"id":"6fb2ae91-00a8-47cd-91ff-3c8db207d3d6","name":"(Pattern 14) What is the time complexity of printing this pattern?","slug":"pattern-14-what-is-the-time-complexity-of-printing-this-pattern","type":4},{"id":"be4ab102-4901-4be6-ae32-70f09ba2addb","name":"(Pattern 14) Can we use while loop instead of for Loop?","slug":"pattern-14-can-we-use-while-loop-instead-of-for-loop","type":4},{"id":"d9549c1a-3434-4497-83d3-423fd72f3220","name":"(Pattern 14) Using while loop instead of forLoop reduces the time complexity ?","slug":"pattern-14-using-while-loop-instead-of-forloop-reduces-the-time-complexity","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":"81c15a38-ca2f-48c6-b185-797a59ef8a7d","name":"Pattern 14","slug":"pattern-14","type":1}],"next":{"id":"a7495587-ee4c-484c-9a71-fb266f96a04a","name":"Pattern 14","type":3,"slug":"pattern-14"},"prev":{"id":"83c921b0-020c-4a72-925d-bb8a5a1fcf81","name":"Pattern 13","type":3,"slug":"pattern-13"}}}
plane

Editor


Loading...

Pattern 14

easy

1. You are given a number n. 2. You've to write code to print it's multiplication table up to 10 in format given below.

Constraints

1 <= n <= 10

Format

Input

A number x

Output

pat141

Example

Sample Input

3

Sample Output

3 * 1 = 3 3 * 2 = 6 3 * 3 = 9 3 * 4 = 12 3 * 5 = 15 3 * 6 = 18 3 * 7 = 21 3 * 8 = 24 3 * 9 = 27 3 * 10 = 30

Question Video

Discussions

Show Discussion

Related Resources

related resources

Turning Off Zen Mode