goldshakil / ElectricalProgrammingCourse2020

This repository is aimed towards sharing and discussing issues about Electrical and Electronics Programming Course
6 stars 1 forks source link

assignment 3 #33

Open chnyl opened 4 years ago

chnyl commented 4 years ago

I couldn't understand what professor said in lecture 3 slide67... He told us not to do '2 to power n' and solve it as an exponential. I don't know what the exact question is, and what was the meaning of "5e-1" which professor wrote on the slide. Can you explain how can I solve this assignment? Thankyou :)

goldshakil commented 4 years ago

You have to make a code that exactly generates the same output as shown in the ppt but there are 2 changes: 1) the allignment of the output doesn't matter. 2) the column of "2 to power -n" should be printed in scientific notation ( e-notation), so instead of printing(0.5) you have to print (5E-1) you can very easily achieve that by using: printf("%e",something);