Files
Cpp-in-Embedded-Systems/Chapter01/compile_time_const.c
Amar Mahmutbegovic de6d74e093 add Chapter01 examples
2024-04-27 20:43:40 +02:00

11 lines
183 B
C

#include <stdio.h>
#define VOLTAGE 3300
#define CURRENT 1000
int main() {
const float resistance = VOLTAGE / CURRENT;
printf("resistance = %.2f\r\n", resistance);
return 0;
}