Sort by

recency

|

1216 Discussions

|

  • + 0 comments

    Javascript

    function main() { const n = parseInt(readLine().trim(), 10);

    for(let i=1; i <= 10; i++){
    console.log(``${n} x $`{i} = ${n*i}`)
    }
    

    }

  • + 0 comments

    Python 3 if name == 'main': n = int(input().strip())

    for i in range(1,11):
        result = n * i
        print( f"{n}", 'x', f"{i}" , '= ' f"{result}" )
    
  • + 0 comments

    Using java it can be completed in very small lines

    for(int i =1;i<=10;i++) { System.out.println(n+" x "+i+" = "+n*i); }

  • + 0 comments

    Python 3.x: for i in range(1, 11): print(f"{n} x {i} = {n*i}")

  • + 0 comments

    Python 3.x: for i in range(1, 11): print(f"{n} x {i} = {n*i}")