Tugas 7 - Perankingan (Manual 700-an Line)
Tugas 7
// Judul : Perankingan
// Oleh : Najma Amira Mumtaz
#include <iostream>
#include <cmath>
using namespace std;
// Kamus
int A;
int B;
int C;
int D;
int E;
// Deskripsi
int main ()
{
cout << "-- Menentukan Ranking --" << endl;
cout << "Masukkan nilai yang berbeda ke dalam A, B, C, D, dan E berikut ini!" << endl;
cout << "A = " ;
cin >> A;
cout << "B = " ;
cin >> B;
cout << "C = " ;
cin >> C;
cout << "D = " ;
cin >> D;
cout << "E = " ;
cin >> E;
cout << "Urutan ranking dari yang terendah adalah sebagai berikut :" << endl;
if ((A<B)&&(B<C)&&(C<D)&&(D<E)) {
cout << "A = " << A << ", B = " << B << ", C = " << C << ", D = " << D << ", E = " << E << endl;
cout << "Nilai terbesar adalah E = " << E << endl;
}
else if ((A<B)&&(B<C)&&(C<E)&&(E<D)) {
cout << "A = " << A << ", B = " << B << ", C = " << C << ", E = " << E << ", D = " << D << endl;
cout << "Nilai terbesar adalah D = " << D << endl;
}
else if ((A<B)&&(B<D)&&(D<C)&&(C<E)) {
cout << "A = " << A << ", B = " << B << ", D = " << D << ", C = " << C << ", E = " << E << endl;
cout << "Nilai terbesar adalah E = " << E << endl;
}
else if ((A<B)&&(B<E)&&(E<C)&&(C<D)) {
cout << "A = " << A << ", B = " << B << ", E = " << E << ", C = " << C << ", D = " << D << endl;
cout << "Nilai terbesar adalah D = " << D << endl;
}
else if ((A<B)&&(B<E)&&(E<D)&&(D<C)) {
cout << "A = " << A << ", B = " << B << ", E = " << E << ", D = " << D << ", C = " << C << endl;
cout << "Nilai terbesar adalah C = " << C << endl;
}
else if ((A<B)&&(B<D)&&(D<E)&&(E<C)) {
cout << "A = " << A << ", B = " << B << ", D = " << D << ", E = " << E << ", C = " << C << endl;
cout << "Nilai terbesar adalah C = " << C << endl;
}
else if ((A<C)&&(C<B)&&(B<D)&&(D<E)) {
cout << "A = " << A << ", C = " << C << ", B = " << B << ", D = " << D << ", E = " << E << endl;
cout << "Nilai terbesar adalah E = " << E << endl;
}
else if ((A<C)&&(C<B)&&(B<E)&&(E<D)) {
cout << "A = " << A << ", C = " << C << ", B = " << B << ", E = " << E << ", D = " << D << endl;
cout << "Nilai terbesar adalah D = " << D << endl;
}
else if ((A<C)&&(C<D)&&(D<B)&&(B<E)) {
cout << "A = " << A << ", C = " << C << ", D = " << D << ", B = " << B << ", E = " << E << endl;
cout << "Nilai terbesar adalah E = " << E << endl;
}
else if ((A<C)&&(C<D)&&(D<E)&&(E<B)) {
cout << "A = " << A << ", C = " << C << ", D = " << D << ", E = " << E << ", B = " << B << endl;
cout << "Nilai terbesar adalah B = " << B << endl;
}
else if ((A<C)&&(C<E)&&(E<B)&&(B<D)) {
cout << "A = " << A << ", C = " << C << ", E = " << E << ", B = " << B << ", D = " << D << endl;
cout << "Nilai terbesar adalah D = " << D << endl;
}
else if ((A<C)&&(C<E)&&(E<D)&&(D<B)) {
cout << "A = " << A << ", C = " << C << ", E = " << E << ", D = " << D << ", B = " << B << endl;
cout << "Nilai terbesar adalah B = " << B << endl;
}
else if ((A<D)&&(D<B)&&(B<C)&&(C<E)) {
cout << "A = " << A << ", D = " << D << ", B = " << B << ", C = " << C << ", E = " << E << endl;
cout << "Nilai terbesar adalah E = " << E << endl;
}
else if ((A<D)&&(D<B)&&(B<E)&&(E<C)) {
cout << "A = " << A << ", D = " << D << ", B = " << B << ", E = " << E << ", C = " << C << endl;
cout << "Nilai terbesar adalah C = " << C << endl;
}
else if ((A<D)&&(D<C)&&(C<B)&&(B<E)) {
cout << "A = " << A << ", D = " << D << ", C = " << C << ", B = " << B << ", E = " << E << endl;
cout << "Nilai terbesar adalah E = " << E << endl;
}
else if ((A<D)&&(D<C)&&(C<E)&&(E<B)) {
cout << "A = " << A << ", D = " << D << ", C = " << C << ", E = " << E << ", B = " << B << endl;
cout << "Nilai terbesar adalah B = " << B << endl;
}
else if ((A<D)&&(D<E)&&(E<B)&&(B<C)) {
cout << "A = " << A << ", D = " << D << ", E = " << E << ", B = " << B << ", C = " << C << endl;
cout << "Nilai terbesar adalah C = " << C << endl;
}
else if ((A<D)&&(D<E)&&(E<C)&&(C<B)) {
cout << "A = " << A << ", D = " << D << ", E = " << E << ", C = " << C << ", B = " << B << endl;
cout << "Nilai terbesar adalah B = " << B << endl;
}
else if ((A<E)&&(E<B)&&(B<C)&&(C<D)) {
cout << "A = " << A << ", E = " << E << ", B = " << B << ", C = " << C << ", D = " << D << endl;
cout << "Nilai terbesar adalah D = " << D << endl;
}
else if ((A<E)&&(E<B)&&(B<D)&&(D<C)) {
cout << "A = " << A << ", E = " << E << ", B = " << B << ", D = " << D << ", C = " << C << endl;
cout << "Nilai terbesar adalah C = " << C << endl;
}
else if ((A<E)&&(E<C)&&(C<B)&&(B<D)) {
cout << "A = " << A << ", E = " << E << ", C = " << C << ", B = " << B << ", D = " << D << endl;
cout << "Nilai terbesar adalah D = " << D << endl;
}
else if ((A<E)&&(E<C)&&(C<D)&&(D<B)) {
cout << "A = " << A << ", E = " << E << ", C = " << C << ", D = " << D << ", B = " << B << endl;
cout << "Nilai terbesar adalah B = " << B << endl;
}
else if ((A<E)&&(E<D)&&(D<B)&&(B<C)) {
cout << "A = " << A << ", E = " << E << ", D = " << D << ", B = " << B << ", C = " << C << endl;
cout << "Nilai terbesar adalah C = " << C << endl;
}
else if ((A<E)&&(E<D)&&(D<C)&&(C<B)) {
cout << "A = " << A << ", E = " << E << ", D = " << D << ", C = " << C << ", B = " << B << endl;
cout << "Nilai terbesar adalah B = " << B << endl;
}
else if ((B<A)&&(A<C)&&(C<D)&&(D<E)) {
cout << "B = " << B << ", A = " << A << ", C = " << C << ", D = " << D << ", E = " << E << endl;
cout << "Nilai terbesar adalah E = " << E << endl;
}
else if ((B<A)&&(A<C)&&(C<E)&&(E<D)) {
cout << "B = " << B << ", A = " << A << ", C = " << C << ", E = " << E << ", D = " << D << endl;
cout << "Nilai terbesar adalah D = " << D << endl;
}
else if ((B<A)&&(A<D)&&(D<C)&&(C<E)) {
cout << "B = " << B << ", A = " << A << ", D = " << D << ", C = " << C << ", E = " << E << endl;
cout << "Nilai terbesar adalah E = " << E << endl;
}
else if ((B<A)&&(A<D)&&(D<E)&&(E<C)) {
cout << "B = " << B << ", A = " << A << ", D = " << D << ", E = " << E << ", C = " << C << endl;
cout << "Nilai terbesar adalah C = " << C << endl;
}
else if ((B<A)&&(A<E)&&(E<C)&&(C<D)) {
cout << "B = " << B << ", A = " << A << ", E = " << E << ", C = " << C << ", D = " << D << endl;
cout << "Nilai terbesar adalah D = " << D << endl;
}
else if ((B<A)&&(A<E)&&(E<D)&&(D<C)) {
cout << "B = " << B << ", A = " << A << ", E = " << E << ", D = " << D << ", C = " << C << endl;
cout << "Nilai terbesar adalah C = " << C << endl;
}
else if ((B<C)&&(C<A)&&(A<D)&&(D<E)) {
cout << "B = " << B << ", C = " << C << ", A = " << A << ", D = " << D << ", E = " << E << endl;
cout << "Nilai terbesar adalah E = " << E << endl;
}
else if ((B<C)&&(C<A)&&(A<E)&&(E<D)) {
cout << "B = " << B << ", C = " << C << ", A = " << A << ", E = " << E << ", D = " << D << endl;
cout << "Nilai terbesar adalah D = " << D << endl;
}
else if ((B<C)&&(C<D)&&(D<A)&&(A<E)) {
cout << "B = " << B << ", C = " << C << ", D = " << D << ", A = " << A << ", E = " << E << endl;
cout << "Nilai terbesar adalah E = " << E << endl;
}
else if ((B<C)&&(C<D)&&(D<E)&&(E<A)) {
cout << "B = " << B << ", C = " << C << ", D = " << D << ", E = " << E << ", A = " << A << endl;
cout << "Nilai terbesar adalah A = " << A << endl;
}
else if ((B<C)&&(C<E)&&(E<A)&&(A<D)) {
cout << "B = " << B << ", C = " << C << ", E = " << E << ", A = " << A << ", D = " << D << endl;
cout << "Nilai terbesar adalah D = " << D << endl;
}
else if ((B<C)&&(C<E)&&(E<D)&&(D<A)) {
cout << "B = " << B << ", C = " << C << ", E = " << E << ", D = " << D << ", A = " << A << endl;
cout << "Nilai terbesar adalah A = " << A << endl;
}
else if ((B<D)&&(D<A)&&(A<C)&&(C<E)) {
cout << "B = " << B << ", D = " << D << ", A = " << A << ", C = " << C << ", E = " << E << endl;
cout << "Nilai terbesar adalah E = " << E << endl;
}
else if ((B<D)&&(D<A)&&(A<E)&&(E<C)) {
cout << "B = " << B << ", D = " << D << ", A = " << A << ", E = " << E << ", C = " << C << endl;
cout << "Nilai terbesar adalah C = " << C << endl;
}
else if ((B<D)&&(D<C)&&(C<A)&&(A<E)) {
cout << "B = " << B << ", D = " << D << ", C = " << C << ", A = " << A << ", E = " << E << endl;
cout << "Nilai terbesar adalah E = " << E << endl;
}
else if ((B<D)&&(D<C)&&(C<E)&&(E<A)) {
cout << "B = " << B << ", D = " << D << ", C = " << C << ", E = " << E << ", A = " << A << endl;
cout << "Nilai terbesar adalah A = " << A << endl;
}
else if ((B<D)&&(D<E)&&(E<A)&&(A<C)) {
cout << "B = " << B << ", D = " << D << ", E = " << E << ", A = " << A << ", C = " << C << endl;
cout << "Nilai terbesar adalah C = " << C << endl;
}
else if ((B<D)&&(D<E)&&(E<C)&&(C<A)) {
cout << "B = " << B << ", D = " << D << ", E = " << E << ", C = " << C << ", A = " << A << endl;
cout << "Nilai terbesar adalah A = " << A << endl;
}
else if ((B<E)&&(E<A)&&(A<C)&&(C<D)) {
cout << "B = " << B << ", E = " << E << ", A = " << A << ", C = " << C << ", D = " << D << endl;
cout << "Nilai terbesar adalah D = " << D << endl;
}
else if ((B<E)&&(E<A)&&(A<D)&&(D<C)) {
cout << "B = " << B << ", E = " << E << ", A = " << A << ", D = " << D << ", C = " << C << endl;
cout << "Nilai terbesar adalah C = " << C << endl;
}
else if ((B<E)&&(E<C)&&(C<A)&&(A<D)) {
cout << "B = " << B << ", E = " << E << ", C = " << C << ", A = " << A << ", D = " << D << endl;
cout << "Nilai terbesar adalah D = " << D << endl;
}
else if ((B<E)&&(E<C)&&(C<D)&&(D<A)) {
cout << "B = " << B << ", E = " << E << ", C = " << C << ", D = " << D << ", A = " << A << endl;
cout << "Nilai terbesar adalah A = " << A << endl;
}
else if ((B<E)&&(E<D)&&(D<A)&&(A<C)) {
cout << "B = " << B << ", E = " << E << ", D = " << D << ", A = " << A << ", C = " << C << endl;
cout << "Nilai terbesar adalah C = " << C << endl;
}
else if ((B<E)&&(E<D)&&(D<C)&&(C<A)) {
cout << "B = " << B << ", E = " << E << ", D = " << D << ", C = " << C << ", A = " << A << endl;
cout << "Nilai terbesar adalah A = " << A << endl;
}
else if ((C<A)&&(A<B)&&(B<D)&&(D<E)) {
Komentar
Posting Komentar