Advertisement
Heretiiik

obdelnik

Oct 21st, 2015
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.29 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main (int argc, char* argv[])
  4. {
  5.     double a = 0,b = 0;
  6.     int x = 0;
  7.     printf("zadej strany obdelnika \'a\' a \'b\': ");
  8.     x = scanf("%lf %lf", &a, &b);
  9.     if (x == 2)
  10.         printf("Obsah: %.2f\nObvod: %.2f\n", (a*b), 2*(a+b));
  11.     else
  12.         printf("chyba");
  13.  
  14.     return 0;
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement