PropWare
3.0.0.229
C++ objects and CMake build system for Parallax Propeller
Simple-Libraries
Learn
Examples
C Intro
Basics
Floating Point Calculations.c
1
/*
2
Floating Point Calculations.c
3
4
Calculate and display circumference of a circle of radius = 1.0.
5
6
http://learn.parallax.com/propeller-c-start-simple/floating-point-math
7
*/
8
9
#include "
simpletools.h
"
// Include simpletools
10
11
int
main
()
// main function
12
{
13
float
r = 1.0;
// Set radius to 1.0
14
float
c = 2.0 * PI * r;
// Calculate circumference
15
print
(
"circumference = %f \n"
, c);
// Display circumference
16
}
simpletools.h
This library provides convenient functions for a variety of microcontroller I/O, timing,...
print
int print(const char *format,...) __attribute__((format(printf
Print format "..." args to the default simple terminal device. The output is limited to 256 bytes.
main
int main(void)
Definition:
GraphicsTest.c:20
Generated on Fri May 20 2022 16:48:04 for PropWare by
1.8.17