Thread: who can do this C program?

  1. #1
    Registered User
    Join Date
    Apr 2021
    Posts
    4

    who can do this C program?

    Make a structure to model time with Hours, Minutes, Seconds, and AM_PM(char).
    Write a function that takes two times and returns either of three values.

    _It returns 0 if both times are the same.
    _It returns 1 if the first time is after the second time.
    _It returns -1 if the first time is before the second time.

    For example, 6:30:10 PM is after 11:55:40 AM.
    In the main program test your function.
    Attached Images Attached Images who can do this C program?-whatsap-jpg 

  2. #2
    Registered User
    Join Date
    Feb 2019
    Posts
    1,078
    I can

  3. #3
    Registered User
    Join Date
    Apr 2021
    Posts
    4
    Do it, if you can.

  4. #4
    Registered User
    Join Date
    Apr 2021
    Posts
    23
    I can, too!

  5. #5
    Registered User
    Join Date
    May 2009
    Posts
    4,183
    This website is for learning to program; it is not a site to get your homework done!

    Tim S.
    "...a computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are,in short, a perfect match.." Bill Bryson

  6. #6
    Registered User rstanley's Avatar
    Join Date
    Jun 2014
    Location
    New York, NY
    Posts
    1,106
    Quote Originally Posted by Jaloliddin View Post
    Do it, if you can.
    The posters here can help you with your code, but you must make an effort to create the initial code. The only way you can learn to code in C is to write code yourself. Of course this is true with any subject you need or want to learn.

    You should also study the "Forum Rules FAQ" posted at the top of this forum.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 1
    Last Post: 01-25-2020, 05:06 PM
  2. Replies: 5
    Last Post: 03-15-2016, 03:29 PM
  3. Replies: 2
    Last Post: 09-09-2014, 02:36 PM
  4. Replies: 1
    Last Post: 03-03-2009, 04:47 PM
  5. Replies: 18
    Last Post: 11-13-2006, 01:11 PM

Tags for this Thread