Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle 10g Database Administrator Implementation And Administration

Authors: Gavin Powell, Carol McCullough Dieter

2nd Edition

1418836656, 9781418836658

Students also viewed these Databases questions

Question

1. Specify (the values for H).

Answered: 1 week ago