Advertisement
Guest User

Untitled

a guest
Feb 20th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.88 KB | None | 0 0
  1. // Klausur_lernen.cpp : Defines the entry point for the console application.
  2. //
  3.  
  4. #include "stdafx.h"
  5. #include "math.h"
  6. #include "stdlib.h"
  7. #include "time.h"
  8. #include "stdio.h"
  9.  
  10.  
  11. #define Max1 100
  12.  
  13.  
  14. float addition(float summand1, float summand2) {
  15.  
  16.     float resultADD = summand1 + summand2;
  17.  
  18.     return resultADD;
  19. }
  20.  
  21. float subthraction(float summand1, float summand2) {
  22.  
  23.     float resultSUB = summand1 - summand2;
  24.  
  25.     return resultSUB;
  26. }
  27.    
  28. float multiplication(float summand1, float summand2) {
  29.  
  30.     float resultMUL = summand1 * summand2;
  31.  
  32.     return resultMUL;
  33. }
  34.  
  35. float division(float summand1, float summand2) {
  36.  
  37.     float resultDIV = summand1 / summand2;
  38.  
  39.     return resultDIV;
  40. }
  41.  
  42.  
  43.  
  44. void main(){
  45.  
  46.     printf("Geben sie die gewünschte Operation ein");
  47.     char enteredOperation[4]="";
  48.     scanf_s("%s", enteredOperation);
  49.  
  50.     printf("%s",enteredOperation);
  51.  
  52.     system("pause");
  53.    
  54. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement