answersLogoWhite

0

How do you convert from seconds to hours in c plus plus?

Updated: 8/19/2019
User Avatar

Wiki User

12y ago

Best Answer

There are 60 seconds per minute and 60 minutes per hour. So divide the total number of seconds by 360 to get the number of hours.

User Avatar

Wiki User

12y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you convert from seconds to hours in c plus plus?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

C program convert hours to minutes?

#include <stdlib.h> #include <stdio.h> int hoursToMinutes( int hours ){ return 60 * hours; } int main(int argc, char *argv){ if(argc != 2) return 1; printf("%i\n", hoursToMinutes(atoi(argv[1]))); return 0; }


How do you convert bmp image to jpg by using C or C Plus Plus?

With libbmp and libjpeg. STFW for details.


How do you write program to convert meter to kilometer in c plus plus?

Divide it by 1000.


Convert from infix to reverse Polish A plus B plus C plus D plus E?

A B plus C plus D plus E plusorA B C D E plus plus plus plusor variations.


Write a c plus plus program that displays the numbers of second in a year?

#include<iostream> int main() { double seconds=60.0; // seconds per minute seconds*=60; // minutes per hour seconds*=24; // hours per day seconds*=365.256363004; // days per year (mean solar days) std::cout<<"On average, there are "<<seconds<<" per year"<<std::endl; }


How do you convert meters to centimeters in c plus plus using the for loop construct?

It is unnecessary to use a for loop to convert meters to centimeters. Just multiply by 0.01.


Formula to convert day into secondin dev c plus plus?

There are 60 seconds in every minute, 60 minutes in every hour, and 24 hours in every day. Thus a day has 60*60*24=86,400 seconds. Aside from the occasional leap second being added to account for the minuscule variation in the Earth's rotation, this value never changes. So you don't need a formula, you can simply store the value 86400 as a constant integer.


How do you convert your codes in visual c plus plus in turbo c?

Although C++ evolved from C, this only makes it possible to convert from C to C++ with relatively minor modification. Converting from C++ to C is rarely so simple. Converting from Microsoft Visual C++ to Borland C++ Builder is hard enough, without the added complexity of replacing all the OOP-based code with C-compliant code. It would actually be simpler to convert the disassembled C++ to procedural C.


How do you convert numeric value into alpha value in c plus plus programming language?

use the _itoa function


How do you convert from assembly to binary in c plus plus?

Use inline assembly instructions. Then compile your C++ program to produce the machine code.


A student skipped a step when she tried to convert 18 hours into seconds and she got the following incorrect result What conversion ratio did she skip in this multiple-step conversion A. B. C. D.?

60 minutes/1hour


Program to get a system time using c plus plus?

time in hours second minute