TOPIC

Compilation Error

Bruno Vargas asked 5 months ago

Alguém consegue me ajudar? pq que tá dando compilation Erro

#include <bits/stdc++.h>

using namespace std;

int main() 
{  
  int dia1,hora1, min1, seg1, dia2, hora2, min2, seg2, dia1calc, hora1calc, min1calc, seg1calc, totalcalc, dia2calc, hora2calc, min2calc, seg2calc, total2calc, diferençaFinal, diaFinal, horaFinal, minFinal, segFinal;

  string diaLixo,diaLixo1,pontos, pontos1;

  cin >> diaLixo >>dia1;
  cin >> hora1 >> pontos >> min1 >>pontos >> seg1;
  cin >> diaLixo1 >>dia2;
  cin >> hora2 >> pontos1 >> min2 >>pontos1 >> seg2;

  dia1calc = dia1 * 86400;
  hora1calc = hora1* 3600;
  min1calc = min1 * 60;
  seg1calc = seg1;

  totalcalc = dia1calc+hora1calc+min1calc +seg1calc;

  dia2calc = dia2 * 86400;
  hora2calc = hora2* 3600;
  min2calc = min2 * 60;
  seg2calc = seg2;

  total2calc = dia2calc+hora2calc+min2calc +seg2calc;

  diferençaFinal = total2calc - totalcalc;

  diaFinal = diferençaFinal/86400;
  horaFinal = (diferençaFinal%86400)/3600;
  minFinal = ((diferençaFinal%86400)%3600)/60;
  segFinal = ((diferençaFinal%86400)%3600)%60;

  cout << diaFinal << " dia(s)" << endl;
  cout << horaFinal << " hora(s)" << endl;
  cout << minFinal << " minuto(s)" << endl;
  cout << segFinal << " segundo(s)" << endl;
} 

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

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