Creative Commons License Foxbond's Repo

/** (c) 2012 Michał (Foxbond) Chraniuk */
#include <iostream>
using namespace std;
int main(int argc, char *argv[]) {
    int a,b,c,d,w;
    cout << "Podaj 4 liczby:\n";
    cin >> a >> b >> c >> d;
    cout << endl << "Podane liczby to: " <<a <<" "<<b <<" "<<c <<" "<<d << endl;
    if (a<b){if (a<c){if (a<d){ w=a; }else { w=d;}}else{if(c<d){ w=c; }else {w=d;}}}else{if (b<c){if (b<d){w=b;}else {w=d;}}else{if (c<d) {w=c;}else { w=d;}}}
    cout << "Najmniejsza liczba to: " << w << endl;
    system("Pause"); return 1; }

> Back