aboutsummaryrefslogtreecommitdiff
path: root/test.c
diff options
context:
space:
mode:
Diffstat (limited to 'test.c')
-rw-r--r--test.c38
1 files changed, 16 insertions, 22 deletions
diff --git a/test.c b/test.c
index 7aa790c..f19dee9 100644
--- a/test.c
+++ b/test.c
@@ -1,25 +1,19 @@
#include <stdio.h>
-float pow(float, float);
-int abs(int);
-float fabs(float);
-int max(int, int);
-int min(int, int);
-float fmax(float, float);
-float fmin(float, float);
-int main() {
- int x = pow(5, 3);
- printf("pow %d\n", x);
- int y = abs(-5);
- printf("abs %d\n", y);
- double z = fabs(-5.0);
- printf("fabs %f\n", z);
- int w = max(5, 3);
- printf("max %d\n", w);
- int n = min(5, 3);
- printf("min %d\n", n);
- int p = fmax(5.0, 3.0);
- printf("fmax %d\n", p);
- int g = fmin(5.0, 3.0);
- printf("fmin %d\n", g);
+void print(char* x) {
+ printf("%s", x);
+}
+void printfl(float x) {
+ printf("%f", x);
+}
+void printint(int x) {
+ printf("%d", x);
+}
+
+int as_int(float x) {
+ return (int) x;
+}
+
+void termpos(int x, int y) {
+ printf("\x1b[%d;%dH", x, y);
}