Question: please convert this code in C++ Import random import time a = [] b = [] def thirty2(): for i in range(32): a.append([random.uniform(1, 10) for

please convert this code in C++  Import random import time a = [] b = [] def thirty2(): for i in range(32): a.append([random.uniform(1, 10) for x in range(1,33)]) for j in range(32): b.append([random.uniform(1, 10) for x in range(1, 33)]) soln = [[sum(x*y for x,y in zip(x_row,y_col)) for y_col in zip(*b)] for x_row in a] return soln a.clear() b.clear()
while True: print("-------------------------") print("Add N as 32, 64, 128, 256, or 512 ---- 0 to exit") x = int(input("Enter N: ")) if x == 32: starttime = time.process_time() print(thirty2()) print("") cpu_time = time.process_time() - starttime print ("System and CPU time : {:0.5f}s".format(cpu_time)) print("-------------------------") print("Thank you for taking part please rerun for another set") break

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!