Advertisement
rygyfygy

Pole prostokąta o wymiarach z pliku

Nov 30th, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. //POLE PROSTOKĄTA O WYMIARACH Z PLIKU
  2. #include <iostream>
  3. #include <fstream>
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8. float a,b;
  9. ifstream wejscie("prostokat.txt");
  10.  
  11.  
  12. wejscie>>a>>b;
  13.  
  14. wejscie.close();
  15. cout<<"a= "<<a<<endl;
  16. cout<<"b= "<<b<<endl;
  17. cout<<"pole prostokata wynosi: "<<a*b;
  18.  
  19.  
  20. return 0;
  21.  
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement