User Tools

Site Tools


notes:cprog:fall2023:projects:cnv0

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
notes:cprog:fall2023:projects:cnv0 [2023/09/24 00:57] – [for() loops] jbernatanotes:cprog:fall2023:projects:cnv0 [2023/09/28 01:25] (current) – [Compiling] xcroft
Line 5: Line 5:
 "main number" % "number" == 0 means that the "number" is a factor. "main number" % "number" == 0 means that the "number" is a factor.
 =====Compiling===== =====Compiling=====
 +Can do gcc cnv0 then it will pop out a.out then do ./a.out and your prompt should come out. 
 +Can also use Make
 =====Loops===== =====Loops=====
  
Line 25: Line 26:
      
 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. 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.
 +
 +Recall, double and (&&) can be used with loops to give more than one condition; however, be cautious when using && as it can sometimes overcomplicate your code.
  
 ====do-while loops==== ====do-while loops====
  
notes/cprog/fall2023/projects/cnv0.1695517036.txt.gz · Last modified: 2023/09/24 00:57 by jbernata