Advertisement
Guest User

Untitled

a guest
Apr 26th, 2018
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. //
  2. // main.cpp
  3. // test
  4. //
  5. // Created by Marcel Bilski on 26.04.2018.
  6. // Copyright © 2018 Marcel Bilski. All rights reserved.
  7. //
  8.  
  9. #include <iostream>
  10. #include <stdlib.h>
  11. #include <stdio.h>
  12.  
  13. using namespace std;
  14.  
  15. int main(int argc, const char * argv[]) {
  16. int tab[3];
  17. int a;
  18. double wynik;
  19. cin>>tab[0], cin>>tab[1], cin>>tab[2];
  20. a = tab[2] - tab[1];
  21. wynik = 0.50 * a * tab[0];
  22. cout<<wynik;
  23. return 0;
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement