Create a multiplication Table with while loop in VS Code
i=1#created a variable name-'i' and assigned the value 1 to it.
n=int(input("Enter a number to create Multiplication table\n"))
#created a int type variable name-'n' and assigned the user input value to it.
while(i<=15):#command for loop iteration times.
print(n,"*",i,"=",n*i)
#printing the value of n,symbol of multiplication,
#value of i,symbol of equals sign and n*i'''
i=i+1# increaminting the valu of i +1 in cach iteration.
print("Multiplication Table of ",n,"is printed")
Comments
Post a Comment