convert into c++ program
In this python program convert into c++ program. Thank you
Source Code:
print("The function is f(x)= 2x+3(2)")
print("Width is 0.05")
lowLim=float(input("Enter Lower Limit: "))
upperLim=float(input("Enter Upper Limit: "))
iterations = (upperLim - lowLim)/0.05
i=0
finAns = 0
while(i<iterations):
print("_________________________________________________________________________________________________________________________________")
print("Iteration:",(i + 1))
print("Function\t\t|\tLower Limit \t|\t Upper Limit \t|\t LRAM Application (width=0.05) \t|\t Answer")
initAns=((2*lowLim)+(3*2))*0.05
print("f(x)= 2x+3(2) \t\t|\tx={:0.2f}\t\t|\tx={:0.2f}\t\t|\t f(x) = (2({:0.2f})+3(2) * 0.05\t|\t {:0.2f}".format(lowLim,lowLim+0.05,lowLim,initAns))
finAns += initAns
lowLim+=0.05
i += 1
print("_________________________________________________________________________________________________________________________________")
print("Final answer/Summation of all iterations is:",finAns)
..
See the picture below that's a output sample output of this program



Step by step
Solved in 3 steps with 3 images









