473,387 Members | 1,585 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,387 software developers and data experts.

help on making a stopwatch using c

5
i need to make a program where in the time is displayed in time is displayed as hours:minuites:seconds with leading zeroes (e.g. 00:00:00).the 12-hour time format will be used.
the user will enter the time the stopwatch should run starting at the equivalent time in hours,minutes, and seconds of the input.the stop watch runs until the time becomes 00:00:00.
this program should be able to print the digits 0 to 9 as block digits (like you would find on a LED display).each digit should contain only the x and . charactes(see example output below)and should be followed by a blank line so the digits are separated.

xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx
x. . .x x. . .x x. . .x x. . .x x. . .x x. . .x
x. . .x x. . .x x. . .x x. . .x x. . .x x. . .x
x. . .x x. . .x x. . .x x. . .x x. . .x x. . .x
xxxxx xxxxx xxxxx xxxxx xxxxx xxxxx
Sep 22 '07 #1
2 1572
mattmao
121 100+
Is this your assignment for a newbie c programmer?

I compared this with my assignment, I found I was so lucky to be in my uni:)
Sep 22 '07 #2
Studlyami
464 Expert 256MB
Please read the posting guidelines; we are not here to do your homework. One suggestion i would give to help you in doing this program is to create the values 0-9 in a string or char array. That way when ever the number changes it would be a simple call.
Sep 22 '07 #3

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

Similar topics

3
by: Kevin | last post by:
Hello: I am trying to find documentation on using the ctime library as I need to be able to instantiate an object to keep track of the time when a certain event occurs. I also need to be able...
5
by: Xero | last post by:
I have written a program that functions similarly to a stopwatch. When the user clicks the button, a label on the form starts counting. The program, however, does not tick once a second. How can I...
18
by: dbahooker | last post by:
team i'm having a tough time getting these data readers to work correctly I'd just like to be able to centralize my GetDataReader functions; so i can pass a simple SQL statement and be passed...
5
by: not_a_commie | last post by:
So I have a motherboard with multiple CPU sockets. It seems that if I create a StopWatch on one thread and then call the Elapsed member from a different thread that sometimes I get a tick count...
3
by: Jeff Jarrell | last post by:
I am unable to add up two timespans as created by the System.Diagnostics.Stopwatch class. Each stopwatch should be about two seconds and is appears ok, but when I try and add them up it goes to...
1
by: =?Utf-8?B?UmFqYQ==?= | last post by:
I am running a sample application that gives me performance time for each action. I am using Stopwatch class (found in System.Diagnostics namespace in ..Net 2.0) to get the Elapsed time. If I run...
4
by: PlusNet | last post by:
Why doesn't the following work? Dim MyStopwatch() as Stopwatch ...Later in the code redim preserve MyStopwatch(10) ...Later in the code MyStopwatch(1).start
3
by: Flomo Togba Kwele | last post by:
I'm looking to replace all commas in a single string not contained within a pair of double-quotes, with a tab. I don't know where to begin. e.g., string line = "a,",,"b" would be changed to...
0
by: kerplunkwhoops | last post by:
Hello I am wanting to use the high accuracy of System.Diagnostics.Stopwatch to get the current time using GetTimeSpan. Underneath, System.Diagnostics.Stopwatch.GetTimeStamp uses the win32 API...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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:
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...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.