#lab 04

#1
#nteger = int(input("Please enter a positive integer: "));
#digit = int(input("Please enter the number of digits: "));


#total = (0)
#integer = integer % (10**digit)
#while (digit > 0):
    
#    digit -= 1
 #   number = integer // (10**digit)
  #  integer = integer % (10**digit)
   # total = total + number
    
#print(total)

#2
#num = int(input("Please enter a postive integer: "));
#total = 0
#for i in range(1,num+1):
#    if(i % 2 == 0):
#        i = i * -1
#    total += i
#print(total)



#4
#dividend = int(input("Please enter a positive integer as the dividend: "));
#divisor = int(input("Please enter a positive integer as the divisor: "));
#count = 0
#while (dividend > divisor):
#    dividend = dividend - divisor
#    count += 1
#dividend = divisor * count + dividend
#remainder = dividend - (divisor *count)
#print(remainder)

#3
#dividend = int(input("Please enter a positive integer as the dividend: "));
#divisor = int(input("Please enter a positive integer as the divisor: "));
#count = 0
#while (dividend > divisor):
#    dividend = dividend - divisor
#    count += 1

#print(count)

#5
#num = int(input("Please enter a positive integer: "));

#a
#for i in range(1, num+1):
#    i = i ** 3
#    print(i)

#b
#for i in range(1, num+1):
#    if ( i**3 <= num):
#        i = i**3
#       print(i)
    
#c
#total = 0
#for i in range(1, num+1):
#    i = i**3
#    total += i
#print(total)

#6
#dimen = int(input("Please enter the dimension of the square matrix: "));
#for i in range(1, dimen+1):
#    matrix = "x" * (i-1) + "o" * 1 + "x" * (dimen-i)
#    print(matrix)

