PropWare
C++ objects and CMake build system for Parallax Propeller
Home
Download
Getting Started
Documentation
Reference
About
Related Links
Namespace List
Class List
File List
Examples
Build System
File List
File Members
propsideworkspace
Learn
Examples
C Intro
Basics
Repeat While.c
1
/*
2
Repeat While.c
3
4
Keep displaying n = n + 5 every half second while n < 200.
5
6
http://learn.parallax.com/propeller-c-start-simple/code-repeats
7
*/
8
9
#include "simpletools.h"
// Include simpletools
10
11
int
main
()
// main function
12
{
13
int
n = 0;
// Declare n, initialize to zero
14
while
(n < 200)
// Repeat while n less than 200
15
{
16
print(
"n = %d\n"
, n);
// Display name & value of n
17
n = n + 5;
// Add 5 to n each time through
18
pause(500);
// 0.5 s between repetitions
19
}
20
print(
"All done!"
);
// Display all done
21
}
main
int main(void)
Definition:
GraphicsTest.c:20
Generated on Sat Aug 27 2016 00:58:03 for PropWare by
1.8.12