Advertisement
Guest User

Untitled

a guest
Oct 18th, 2019
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main(){
  4.  
  5. int a, b, c, d;
  6. int sum;
  7. float mathf = 1.10;
  8. float mathe = 0.91;
  9. float franken;
  10. float euro;
  11.  
  12. printf("Gebe hier Deine Waehrung an die Du umwandeln moechtest 1 fuer Euro in Franken 2 fuer Franken in Euro");
  13. scanf("%d", &a,&b);
  14.  
  15. if (a==1)
  16. {
  17. printf("Du hast Euro gewaehlt, gebe nun Deinen Wert zum umrechnen in schweizer Franken an");
  18. scanf("%d", &c);
  19.  
  20. franken = c * mathf;
  21.  
  22. printf("Deine Umrechnung betraegt %10.2f Franken", franken);
  23.  
  24. }
  25.  
  26. else (b==2);
  27. {
  28. printf("Du hast Schweizer Franken gewaelt, gebe nun Deinen Wert zum umrechnen in Euro an");
  29. scanf("%d", &d);
  30.  
  31. euro = d * mathe;
  32.  
  33. printf("Deine Umrechnung betraegt %10.2f Euro", euro);
  34. }
  35.  
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement