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
Decide on Multiple Conditions.c
1
/*
2
Decide on Multiple Conditions.c
3
4
Make a decision based on two conditions.
5
6
http://learn.parallax.com/propeller-c-start-simple/make-complicated-decisions
7
*/
8
9
#include "simpletools.h"
// Include simpletools
10
11
int
main
()
// main function
12
{
13
int
a = 100;
// Initialize a variable to 25
14
int
b = 17;
// Initialize b variable to 17
15
print(
"a = %d, b = %d\n"
, a, b);
// Print all
16
if
((a > b) && (a == 100))
// If a > b AND A == 100
17
{
18
print(
"a is larger than b,\n"
);
// Then print this message
19
print(
"AND a is 100!\n"
);
// Then print this message
20
}
21
}
main
int main(void)
Definition:
GraphicsTest.c:20
Generated on Sat Aug 27 2016 00:58:03 for PropWare by
1.8.12