Advertisement
peterzig

Untitled

Nov 9th, 2015
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.58 KB | None | 0 0
  1. // rownanie.cpp : Defines the entry point for the console application.
  2. //
  3.  
  4. #include "stdafx.h"
  5. #include <conio.h>
  6. #include <math.h>
  7.  
  8.  
  9. int main()
  10. {
  11.     float a, b, c, d;
  12.     float y;
  13.     printf("podaj wartosc a: \n");
  14.     scanf("%d", &a);
  15.     printf("podaj wartosc b: \n");
  16.     scanf("%d", &b);
  17.     printf("podaj wartosc c: \n");
  18.     scanf("%d", &c);
  19.     printf("podaj wartosc d: \n");
  20.     scanf("%d", &d);
  21.     y = sqrt(a + b) / c*c - sqrt(d) + 5 / b - 4;
  22.         if (c*c==0 && b-4==0)
  23.         {
  24.             printf("Brak rozwiazania");
  25.         }
  26.         else
  27.         {
  28.             printf("Wynik to: %5.2f", y);
  29.         }
  30.  
  31.         _getch();
  32.     return 0;
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement