Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // homework 3
- // ex 3
- #include <iostream>
- #include <cmath>
- using namespace std;
- int main()
- {
- double a;
- double b;
- double c;
- double f;
- cout << "first number ";
- cin >> a;
- cout << "second number ";
- cin >> b;
- cout << "another number ";
- cin >> c;
- cout << "and another number ";
- cin >> f;
- if ((a==c)&&(a==b)&&(a==f))
- {
- cout << "minimum number " << a << endl;
- }
- if ((a<b)&&(a<c)&&(a<f))
- {
- cout << "minimum number " << a << endl;
- }
- if ((b<a)&&(b<c)&&(b<f))
- {
- cout << "minimum number " << b << endl;
- }
- if ((c<a)&&(c<b)&&(c<f))
- {
- cout << "minimum number " << c << endl;
- }
- if ((f<a)&&(f<b)&&(f<c))
- {
- cout << "minimum number " << f << endl;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement