We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Tutorials
- 30 Days of Code
- Day 5: Loops
- Discussions
Day 5: Loops
Day 5: Loops
Sort by
recency
|
1222 Discussions
|
Please Login in order to post a comment
function main() { const n = parseInt(readLine().trim(), 10); for ( let i = 1 ; i <= 10 ; i++) { let result = n * i console.log(
{i} = ${result}
) } }Python3:
if name == 'main': n = int(input().strip()) for i in range(1,11): print(f'{n} x {i} = {n*i}')
import math import os import random import re import sys
n=int(input()) i=1 for i in range (1,11): print (f"{n} x {i} = {(n*i)}")