pa-03
This commit is contained in:
21
pa-03/a3/main.c
Normal file
21
pa-03/a3/main.c
Normal file
@@ -0,0 +1,21 @@
|
||||
#include "./funktionen/to_upper_case.h"
|
||||
#include "./funktionen/to_ascii.h"
|
||||
#include <stdio.h>
|
||||
|
||||
int main() {
|
||||
printf("Beenden von Schleifen mit ~ ...\n");
|
||||
printf("Geben sie Zeichen ein. Diese werden in Uppercase wieder ausgegeben:\n");
|
||||
while (1) {
|
||||
int c = getchar();
|
||||
if (c == '~') break;
|
||||
printf("[%d] %c", c, to_upper_case(c));
|
||||
}
|
||||
printf("Geben sie Zeichen ein. Diese werden als Ascii-Code wieder ausgegeben:\n");
|
||||
while (1) {
|
||||
int c = getchar();
|
||||
if (c == '~') break;
|
||||
printf("[%d] %d", c, to_ascii(c));
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user