Advertisement
dzieciol

Laboratorium II Zadanie 3

Nov 23rd, 2015
447
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.25 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int main()
  5. {
  6.  int x;
  7.  float a;
  8.  printf("wpisz x:");
  9.  scanf("%d",&x);
  10.  
  11.  if (x<15)
  12.  a=1.0*x*x+3;
  13.  if (x<=300)
  14.  a=1.0*x+1;
  15.  else
  16.     a=1.0*(x*x-5)/(3*x*x+3*x);
  17.  printf("%.2f",a);
  18.  
  19.  
  20.  
  21.     return 0;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement