473,385 Members | 1,930 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Doing an excercise having a hard time getting it right. Help!!

2
Write an interactive program that prompts the users for three values representing time duration in hours, mintues and seconds and then prints the equivalent total number of seconds?
Jan 28 '08 #1
3 1062
gpraghuram
1,275 Expert 1GB
Write an interactive program that prompts the users for three values representing time duration in hours, mintues and seconds and then prints the equivalent total number of seconds?

can you tell us to what extent you have reached and where r u getting stuck?
Raghuram
Jan 28 '08 #2
sisao
2
can you tell us to what extent you have reached and where r u getting stuck?
Raghuram
the outcome has to look like this:

Enter a duration in hours, mintues and seconds each separated by space
Press<Enter> key when you are done: 6 34 22
Results:

6 hours 34 minutes and 22 seconds is equivalent to 15813 seconds.

all done...
Press any key to continue_

This is how the program should look like.But I just can't get it going. Having hard time with hours mintues and second(the second line).
Jan 28 '08 #3
gpraghuram
1,275 Expert 1GB
the outcome has to look like this:

Enter a duration in hours, mintues and seconds each separated by space
Press<Enter> key when you are done: 6 34 22
Results:

6 hours 34 minutes and 22 seconds is equivalent to 15813 seconds.

all done...
Press any key to continue_

This is how the program should look like.But I just can't get it going. Having hard time with hours mintues and second(the second line).

The logic is simple...
1)convert the hours to minutes
2)Convert the minutes to seconds
3)Then add up all these values to display it into seconds

Now tell me in which step u are stuck after trying the logic

Raghuram
Jan 28 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: George Hester | last post by:
You know there is a difference between the Microsoft .NET Framework and the Microsoft .NET Framework SDK. Besides the fact that the former is 20 some MB and the latter is some 100MB there is a...
6
by: NomoreSpam4Me | last post by:
Hi there i'm having a hard time: i have a form and a rpt base on a qry Name: Frm Notice Rpt Notice Qry Notice
7
by: Peter Row | last post by:
Hi, I've started work on my own control some parts of which use standard controls, others I need to draw on my controls surface to get the display output I require, however.... I seem to be...
11
by: Jim S. | last post by:
hi guys and gals, i have an array, but i have the hardest time putting the value in the table, so what is the normal procedure? thanks Jim
12
by: eyoung | last post by:
Can someone tell me what I've done wrong here...this kinda works...but no cigar! I want to loop threw each "Service Number" and get all entries before going on to the next. What looks something...
1
by: gmax2006 | last post by:
Hi, I am having hard time with installing MySQLdb on Linux. My Python version is 2.3. I have downloaded "MySQL-python-1.2.1_p2.tar.gz" from sourceforge. The README file asks for MySQL...
0
by: antonyliu2002 | last post by:
I am having a hard time connecting to an oracle database from within Visual Web Developer (VWD) 2005 Express Edition. Check out the screen snap shot here: ...
7
by: Dresse | last post by:
Hello again I am having some trouble getting the right data out of my database, maybe any of you can help me get the right data. My Tables: tblReport ReportID (pk) Date
4
by: LyTseu | last post by:
Hello All, I'm having a hard time setting up a form using two control source. Let me explain to you my form first. The form acquires data and date and comment in table A so we have...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.