xiranda/test.c

39 lines
586 B
C
Raw Normal View History

2024-03-31 22:58:48 -04:00
//~#include <unistd.h>
//~int string_length (char * string) {
//~int length = 0;
//~while (* (string + length)) length++;
//~return length;
//~}
//~void echo (char * string) {
//~write (1, string, string_length (string));
//~}
//~int main (void) {
//~echo ("Heyo world!\n");
//~return (0);
//~}
extern int z;
extern int strlen (char * data) {
int l = 0;
while (* (data + l) != 0) l++;
return l;
}
extern int add (int x, int y) {
z = x + y;
return x;
}
extern int zod (int x, int y) {
return x % y;
}
extern int mod (int x, int y) {
x = add (x, y);
return x % y;
}