top of page
Writer's pictureValeria Dominguez :)

Journal 1-10-20

Swapping variables

To swap is to exchange

int num1 = 5, num2 = 10;

num1 = num2;

num2 = num1;

need to store the value of num1

temp Is an intermediate variable

temp = num1;

value of num1 is kept in var temp

then you would have to write : num2 = temp;

3 views0 comments

Recent Posts

See All

Week of May 4th

The webinars given out by the Advanced Placement Youtube Channel are helpful because they are going over the create task and are able to...

Psuedocode and Flowchart

Flowchart: https://www.lucidchart.com/invitations/accept/cc05222f-f576-4ded-b0b2-0e2d8596dbf7 Pseudocode: https://editor.p5js.org/Valeria...

Comments


images.jpeg
images.jpeg
33bbd948ce37bf4c73fbf029b5214fbb.jpg
3bbd948ce37bf4c73f29b5214fbb.jpg
bottom of page