Recent content by Hector3436

  1. H

    Input to Eliminate Test Scores on Program

    Hello to all, I'm doing some tweaks to a previously written code and I am struggling to change an input. Written in C lang., the code is used to get the average test scores as the user inputs them. The tricky part is that the program is written to eliminate only the lowest score. How can I...
  2. H

    Proper Steps for Bubble Sort Algorithm

    function [S] = bubblesort(X) % Bubble sort implementation len = length(X); S=X; % t0=tic; sorted = false; while (~sorted) sorted = true; for i=1:len-1 if S(i) > S(i+1) tmp = S(i); S(i) = S(i+1); S(i+1) = tmp; sorted = false...
  3. H

    Series of pi with three aproximations in C Lang

    Thanks to both of you. I did notice the rounding after doing a verification. Is it possible to increase the amount of decimals in the variable declaration? Thank you
  4. H

    Series of pi with three aproximations in C Lang

    Best answer selected by Hector3436.
  5. H

    Series of pi with three aproximations in C Lang

    This is my code for calculating pi. My professor asked that the program's loops end when 3.14,3.141, and 3.1415 appear for the first time, no matter the decimals after the ones asked for. The problem is that it stops at 3.141 two n terms after it actually reaches it the first time, and when it...