Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
function personProgram ()
    choice = -1;
    P = [];
    printHeader();
    while choice ~= 0
        printMenu();
        choice = input ('Velg et tall: ');
		clc
        if choice == 0
            continue;
        end
        P = process(P, choice);
    end
    printFooter();
end

...

Code Block
function P = processChangePerson (P)
	for i = 1:length(P)
        fprintf('%i. ', i);
        printPerson(P(i));
    end
	index = input ('Hvilken person vil du endre ? ');
	P(index) = promptPerson();
end