Browse Source

einlesen mehrerer Floats

lookup-tables
Stephan Richter 7 years ago
parent
commit
fab0845544
  1. 11
      src/main.c

11
src/main.c

@ -1,10 +1,11 @@ @@ -1,10 +1,11 @@
#include <stdio.h>
int main(){
int alter;
printf("Wie alt sind sie? ");
scanf("%d", &alter);
printf("\nIn %d Jahren sind Sie 100!\n", 100-alter);
float a,b;
printf("erste Zahl eingeben:");
scanf("%f",&a);
printf("erste Zahl eingeben:");
scanf("%f",&b);
printf("die Summe aus %f und %f ist %.3f",a,b,a+b);
return 0;
}

Loading…
Cancel
Save