Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- using namespace std;
- int N(int a, int b, int c)
- {
- if(a <= b)
- {
- if (a <= c)
- {
- return a;
- }
- else
- {
- return c;
- }
- }
- return b;
- }
- int main(int argc, char** argv) {
- int a, b, c;
- ifstream odczyt("ryt.txt");
- odczyt >> a >> b >> c;
- cout << a << " " << b << " " << c<<endl;
- cout<< "najmniejsza liczba to " << N(a, b, c);
- odczyt.close();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment