Guest User

Untitled

a guest
Mar 16th, 2015
416
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.53 KB | None | 0 0
  1. #ifdef _MSC_VER
  2.     #define _CRT_SECURE_NO_WARNINGS
  3. #endif
  4.  
  5. #include <stdio.h>
  6. #include <conio.h>
  7. #include <math.h>
  8. #include <ctype.h>
  9.  
  10. const false = 0 || NULL;
  11.  
  12. double add(double one, double two) {
  13.     return one + two;
  14. }
  15.  
  16. main() {
  17.     double a[3];
  18.     printf("DODAJEMY\n");
  19.     switch (scanf("%lf%lf", &a[0], &a[1])) {
  20.         case 0: {
  21.             printf("Musisz użyć liczb.");
  22.             break;
  23.         } default: {
  24.             a[2] = add(a[0], a[1]);
  25.             printf("Suma wyników %.0lf i %.0lf to %.0lf\n", a[0], a[1], a[2]);
  26.             break;
  27.         }
  28.     }
  29.     return false;
  30. }
Advertisement
Add Comment
Please, Sign In to add comment