मराठी

Write a program to display a multiplication table for a given number.

Advertisements

प्रश्न

Write a program to display a multiplication table for a given number.

थोडक्यात उत्तर
Advertisements

उत्तर

Coding:
num=int(input(“Display Multiplication Table of “))
for i in range(1,11):
print(i, x ,num, ‘=’, num*i)

Output:

Display Multiplication Table of 2
1 x 2 = 2
2 x 2 = 4
3 x 2 = 6
4 x 2 = 8
5 x 2 = 10
6 x 2 = 12
7 x 2 =14
8 x 2 = 16
9 x 2 =18
10 x 2 = 20
>>>

shaalaa.com
Control Structure
  या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
पाठ 6: Control Structures - Evaluation [पृष्ठ ८८]
Advertisements
Share
Notifications



      Forgot password?
Use app×