Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)
Paste
Pasted as C++ by diem ( 5 years ago )
#include<iostream>
using namespace std;
int main(){
int a;
cout<<"Nhap so so hang cua day:";
cin>>a;
int Arr[a];
for (int i = 0; i < a; i++)
{
cout<<"Nhap so thu "<<i+1<<" cua day:";
cin>>Arr[i];
}
for (int m = 0; m < a-1; m++)
{
int Tg;
for (int n = m+1; n < a; n++)
{
if (Arr[m]<Arr[n])
{
Tg=Arr[m];
Arr[m]=Arr[n];
Arr[n]=Tg;
}
}
}
cout<<"3 so hang lon nhat cua day la:";
for (int j = 0; j < 3; j++)
{
cout<<Arr[j]<<" ";
}
}
Revise this Paste
Parent: 117593