halo
This commit is contained in:
parent
fa1fd42f64
commit
28ff2d1464
11
adturing.h
Normal file
11
adturing.h
Normal file
@ -0,0 +1,11 @@
|
||||
|
||||
#ifndef ADTURING_H
|
||||
#define ADTURING_H
|
||||
|
||||
// Addiert 1 zu einer Dualzahl (als String) und speichert das Ergebnis in output
|
||||
// input: Dualzahl als String, z.B. "1011"
|
||||
// output: Ergebnis als String, z.B. "1100"
|
||||
// maxlen: Maximale Länge des output-Arrays (inklusive '\0')
|
||||
void dual_addiere_eins(const char *input, char *output, int maxlen);
|
||||
|
||||
#endif // ADTURING_H
|
11
bildschi.h
Normal file
11
bildschi.h
Normal file
@ -0,0 +1,11 @@
|
||||
|
||||
#ifndef BILDSCHI_H
|
||||
#define BILDSCHI_H
|
||||
|
||||
// Liest eine Dualzahl als Zeichenkette vom Benutzer ein
|
||||
void dualzahl_einlesen(char *buffer, int maxlen);
|
||||
|
||||
// Gibt die Dualzahl aus
|
||||
void dualzahl_ausgeben(const char *buffer);
|
||||
|
||||
#endif // BILDSCHI_H
|
11
dualaddi.c
11
dualaddi.c
@ -1,11 +1,6 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
// Funktionsprototypen (damit der Compiler weiß, dass es sie gibt)
|
||||
void fehlerausgabe(const char *msg);
|
||||
void dualzahl_einlesen(char *buffer, int maxlen);
|
||||
void dualzahl_ausgeben(const char *buffer);
|
||||
void dual_addiere_eins(const char *input, char *output, int maxlen);
|
||||
#include "fehler.h"
|
||||
#include "bildschi.h"
|
||||
#include "adturing.h"
|
||||
|
||||
#define MAXLEN 65 // Maximale Länge der Dualzahl (64 Bit + 1 für \0)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user