Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int num,horas,mins,seg;
- cout << "Este programa convierte segundos a minutos y segundos \n";
- cout<<"Ingrese los segundos"<<endl;
- cin>>num;
- mins = num / 60;
- seg = num % 60;
- horas = mins / 60;
- mins = mins % 60;
- cout<<"Son "<<horas<< "h "<<mins<<"m "<<seg<<"s";
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement