Warning: The magic method Slickr_Flickr_Plugin::__wakeup() must have public visibility in /home/kenbauer/public_kenscourses/tc101winter2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php on line 152

Warning: Cannot modify header information - headers already sent by (output started at /home/kenbauer/public_kenscourses/tc101winter2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101winter2015/wp-includes/feed-rss2.php on line 8
‘#11209099’ Articles at Courses by Ken https://kenscourses.com/tc101winter2015 Facilitator of Learning Experiences Fri, 10 Apr 2015 04:15:27 +0000 en hourly 1 https://creativecommons.org/licenses/by/4.0/ #WSQ14 https://kenscourses.com/tc101winter2015/2015/wsq14-10/ Fri, 10 Apr 2015 04:15:27 +0000 https://osvservin.withknown.com/2015/wsq14 Continue reading ]]>

 

Hi, I have finished my wsq14, so it had a part I didn’t (maybe don’t) understand at all but I could achieve it by checking the link http://stackoverflow.com/questions/11208971/round-a-float-to-a-given-precision/11209099#11209099, furthermore in this wsq I could take a part of a previous activity, well I will leave my code in the next link:

 

https://www.dropbox.com/s/cvigigh61tv2sdh/wsq14.cpp?dl=0

]]>
https://creativecommons.org/licenses/by/4.0/
#WSQ14 https://kenscourses.com/tc101winter2015/2015/wsq14-11/ Fri, 10 Apr 2015 04:15:27 +0000 https://osvservin.withknown.com/2015/wsq14 Continue reading ]]>

 

Hi, I have finished my wsq14, so it had a part I didn’t (maybe don’t) understand at all but I could achieve it by checking the link http://stackoverflow.com/questions/11208971/round-a-float-to-a-given-precision/11209099#11209099, furthermore in this wsq I could take a part of a previous activity, well I will leave my code in the next link:

 

https://www.dropbox.com/s/cvigigh61tv2sdh/wsq14.cpp?dl=0

]]>
https://creativecommons.org/licenses/by/4.0/
#WSQ14 https://kenscourses.com/tc101winter2015/2015/wsq14-7/ Fri, 10 Apr 2015 02:51:14 +0000 https://taniapardo.withknown.com/2015/wsq14 Continue reading ]]>

In this program you need to estimate the constant “e”, to do this you need to ask the user the number of decimals points, and that will be your precision.

If you want to know about the formula that we are going to use and things about that, you can check this page: http://www.iboenweb.com/ibo/docs/Demostracion%20de%20Formula%20de%20Euler.htm

To organize the program I created a function called factorial, to calculate the factorial that will be introduced in the function calculateE.

The function calculateE is float, because is going to return a non integer number.

The loop do-while, inside the function calculateE, is useful to add the value according with the formula, but this loop will depend by the precision that the user wants.

Finally, you need to truncate the number calculated depending by the precision asked.

Here you can see my code and the program working.

If you don’t know how to round a float, you can check this page: http://stackoverflow.com/questions/11208971/round-a-float-to-a-given-precision/11209099#11209099

Also, here you can find my code:

GitHub: https://github.com/taniaprogram/SolvingProblemsWithProgramming/blob/master/Euler.cpp

Google Drive: https://drive.google.com/file/d/0B-NM4ghaDXBvUEw5RE9nTVZrTjQ/view?usp=sharing

]]>
https://creativecommons.org/licenses/by/4.0/
WSQ14 – Calculate e https://kenscourses.com/tc101winter2015/2015/wsq14-calculate-e/ Tue, 07 Apr 2015 23:49:43 +0000 https://juanpsantana.withknown.com/2015/wsq14---calculate-e Continue reading ]]>

Hey everybody! In this time, we wrote a code to calculate Euler’s constant or e number. That part was simple, the problem came when we need to stop the programm when we have the precision (decimal point numbers) that we required. To acomplishied that, we use a function called floor which we take from here

http://stackoverflow.com/questions/11208971/round-a-float-to-a-given-precision/11209099#11209099

Anyway, here is the link to my code. Enjoy it!

https://github.com/juanpsantana/WSQs/blob/master/WSQ14.cpp

]]>
https://creativecommons.org/licenses/by/4.0/