Solution to the problem number 471 of AceptaelReto - 471.

Any questions do not hesitate to contact.

#include <bits/stdc++.h>
using namespace std;

int main()
{
 int cases; cin>>cases;
 while(cases--)
 {
    int c,p; cin>>c>>p;
    int difa=0,difb=0,aux=c,aux1=p;
    while(aux!=aux1) { difa++; aux++; if(aux==360) aux=0;} aux=c;
    while(aux!=aux1) { difb++; aux--; if(aux==-1) aux=359;}
    if(difa==difb) cout<<"DA IGUAL\n";
    else if(difa<difb) cout<<"ASCENDENTE\n";
    else cout<<"DESCENDENTE\n";
 }
 return 0;
}

Don't miss anything.

Keep in touch with Isaac Lozano Osorio!