User Tools

Site Tools


notes:cprog:fall2023:projects:cnv0

This is an old revision of the document!


Background

Determining factor pairs

“main number” % “number” == 0 means that the “number” is a factor.

Compiling

Loops

for() loops

while() loops

A “while” loop is a kind of loop that runs until the parameters of an expression are fulfilled. For example, if you have:

number = 6
factor = 1

while (factor <= number)
{
factor = factor + 1
};

This means that the factor variable, in this example “1,” will continue to pass through the looping process, adding a value of 1 each time. This will occur 5 times until factor becomes equal to 6, fulfilling the parameters originally set.

do-while loops

notes/cprog/fall2023/projects/cnv0.1695431778.txt.gz · Last modified: 2023/09/23 01:16 by gsalce