Thank you for visiting Write a program in C that asks the user to enter a number of seconds 3 a There are 86400 seconds in a day If. This page is designed to guide you through key points and clear explanations related to the topic at hand. We aim to make your learning experience smooth, insightful, and informative. Dive in and discover the answers you're looking for!
Answer :
In this exercise we have to use the knowledge of C++ to write a program that is possible that asks the user to enter a number of seconds.
Writting the code:
#include
#include
using namespace std;
int main() {
int n;
cout<<"Time Calculator"<
cout<<"Enter the seconds you would like to calculate into days, hours, minutes: ";
cin>>n;
cout<
cout<<"\t"<<(n/(24*60*60))<<" day(s)"<
n = n % (24*60*60);
cout<<"\t"<<(n/(60*60))<<" hours(s)"<
n = n % (60*60);
cout<<"\t"<<(n/(60))<<" minutes(s)"<
n = n % (60);
cout<<"\t"<<(n)<<" seconds(s)"<
return 0;
}
See more about C++ at brainly.com/question/19705654
#SPJ1
Thank you for reading the article Write a program in C that asks the user to enter a number of seconds 3 a There are 86400 seconds in a day If. We hope the information provided is useful and helps you understand this topic better. Feel free to explore more helpful content on our website!
- You are operating a recreational vessel less than 39 4 feet long on federally controlled waters Which of the following is a legal sound device
- Which step should a food worker complete to prevent cross contact when preparing and serving an allergen free meal A Clean and sanitize all surfaces
- For one month Siera calculated her hometown s average high temperature in degrees Fahrenheit She wants to convert that temperature from degrees Fahrenheit to degrees
Rewritten by : Jeany