erste Strings

This commit is contained in:
Stephan Richter
2018-02-09 14:27:02 +01:00
parent cc16eda8b1
commit 9459357c29

View File

@@ -1,11 +1,9 @@
#include<stdio.h>
// Symbolische Konstante
#define MWSTFAKTOR 0.19
#include<string.h>
int main() {
float betrag = 350.0;
float mwst = betrag * MWSTFAKTOR;
printf("%.f% von %.2f Euro: %.2f Euro\n", MWSTFAKTOR * 100, betrag, mwst);
char string[] = "Die schoenen Dinge im Leben sind umsonst.";
int laenge = strlen(string);
printf("Laenge: %d Zeichen\n", laenge);
return 0;
}