Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //program pobiera dane z pliku prostokat.txt i obliczy pole tego prostokata.
- #include <iostream>
- #include <fstream>
- #include <cstdio>
- using namespace std;
- int main()
- {
- int a,b;
- ifstream wejscie("prostokat.txt");
- if (!wejscie)
- {
- cout<<"Nie mozna odtworzyc pliku";
- getchar();
- return 1;
- }
- wejscie>>a>>b;
- wejscie.close();
- cout<<"Pole prostokata wynosi: "<<a*b;
- getchar();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement