:v help, i can't find where error is

0 votes
asked Mar 6, 2019 by The Death (150 points)
#include <iostream>

using namespace std;

int main()

{

float c = 0 , h = 0;

int a = 0 , b = 0 , d = 0 ,  e = 0 , g = 0 ;

cout<<"Seconds "<<endl;

cin>>a;

a%60=b;

a/60=c;

int d = (int) c;

d%60=e;

d/60=h;

int g = (int) h;

cout<<"Hour: "<<h<<endl;

cout<<"Minute: "<<e<<endl;

cout<<"Second: "<<b<<endl;

return 0;

}

2 Answers

+1 vote
answered Mar 6, 2019 by anonymous
you cant store integer type value in a float variable
commented Mar 7, 2019 by Andreis (120 points)
wrong.
Assignment statements are wrong, it should be:
b=a%60;


and so on
+1 vote
answered Mar 7, 2019 by Abhishek
b=a%60

c=a/60

e=d%60

h=d/60

remove declaration of g and d
commented Mar 9, 2019 by The Death (150 points)
thank you......
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.
...