import os 
import matplotlib.pyplot as plt
results = {}

axis = []
resu = []
for i in range(100, 2100, 100):
    results[i] = []
    axis.append(i)
    for j in range(10):
        os.system('./main '+str(i)+ " > res")
        r = open("res", "r")
        res = float(r.readline())
        results[i].append(res)
    resu.append(sum(results[i])/15)

print results
print axis
print resu
plt.plot(axis, resu)
plt.show()
