I am creating a program that will convert seconds into hrs mins and the remainding seconds. I've got the hours part down but for minutes im trying to use the remainder funtion.
#include <cstdlib>
#include <iostream>
using namespace std;
int main()
{
int secns, mins, hrs, convs, sec, sph, s;
cout<<"Enter the number of conversions you would like performed\n";
cin>>convs;
mins<=60;
sph=3600;
for (int num=1; num<=convs; num++)
{
cout<<"Enter the number of seconds for the conversion #"<<num<<"\n";
cin>>sec;
hrs=sec/sph;
cout<<hrs<<"\n";
mins=sec%sph;
cout<<mins<<"\n";
secns=sec-7860;
cout<<secns;
cin>>s;
}
return 0;
}
the remainder output should be 11 but im getting 703??????
anyone that can tell me whats wrong and i am aware that the code for the program is not finished.