TOPIC

Ta dando erro

gapereira4 asked 3 years ago

alguem sabe porque ta dando erro?

include

include

using namespace std;

int main() { int dia1, dia2; int h1, h2, m1, m2, s1, s2; int dur;

cout << "Dia ";
cin >> dia1;
cin >> h1 >> m1 >> s1;

cout << "Dia ";
cin >> dia2;
cin >> h2 >> m2 >> s2;

dur = ((dia2 * 86400 + h2 * 3600 + m2 * 60 + s2) - (dia1 * 86400 + h1 * 3600 + m1 * 60 + s1));

cout << dur / 86400 << " dia(s)" << endl;
cout <<  (dur % 86400) / 3600 << " hora(s)" << endl;
cout << ((dur % 86400) % 3600) / 60 << " minuto(s)" << endl;
cout << ((dur % 86400) % 3600) % 60 << " segundo(s)" << endl;

return 0;

}

This topic has not been answered yet. Be the first!

Remember not post solutions. Your post may be reviewed by our moderators.