anonymous
  • anonymous
1
Computer Science
  • Stacey Warren - Expert brainly.com
Hey! We 've verified this expert answer for you, click below to unlock the details :)
SOLVED
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.
katieb
  • katieb
I got my questions answered at brainly.com in under 10 minutes. Go to brainly.com now for free help!
anonymous
  • anonymous
what are the erros that you are getting?
anonymous
  • anonymous
Well first off you are going to have to add #include at the beginning. i am compiling your code now and fixing it
anonymous
  • anonymous
*to the best of my abilities

Looking for something else?

Not the answer you are looking for? Search for more explanations.

More answers

anonymous
  • anonymous
what are you trying to do with the first part of the code? it seems that you are calling a structure and calling other structures into that structure? i never saw an initial definition of any of the structures, correct me if i am wrong
anonymous
  • anonymous
#include #include int dt; struct dateAndTime clockKeeper (struct dateAndTime dt) { struct time timeUpdate (struct time now); struct date dateUpdate (struct date today); dt.stime = timeUpdate (dt.stime); if ( dt.stime.hour == 0 && dt.stime.minutes == 0 && dt.stime.seconds == 0 ) { dt.sdate = dateUpdate (dt.sdate); } return dt; } int main (void) { int dt1; int dt2; struct dateAndTime dt1 = { { 12, 31, 2004 }, { 23, 59, 59 } }; struct dateAndTime dt2 = { { 2, 28, 2008 }, { 23, 59, 58 } }; printf ("Current date and time is %.2i/%.2i/%.2i %.2i:%.2i:%.2i\n", dt1.sdate.month, dt1.sdate.day, dt1.sdate.year, dt1.stime.hour, dt1.stime.minutes, dt1.stime.seconds); dt1 = clockKeeper (dt1); printf ("Updated date and time is %.2i/%.2i/%.2i ", "%.2i:%.2i:%.2i\n\n", dt1.sdate.month, dt1.sdate.day, dt1.sdate.year, dt1.stime.hour, dt1.stime.minutes, dt1.stime.seconds); printf ("Current date and time is %.2i/%.2i/%.2i " "%.2i:%.2i:%.2i\n", dt2.sdate.month, dt2.sdate.day, dt2.sdate.year,dt2.stime.hour, dt2.stime.minutes, dt2.stime.seconds); dt2 = clockKeeper (dt2); printf ("Updated date and time is %.2i/%.2i/%.2i " "%.2i:%.2i:%.2i\n\n",dt2.sdate.month, dt2.sdate.day, dt2.sdate.year, dt2.stime.hour, dt2.stime.minutes, dt2.stime.seconds); printf ("Current date and time is %.2i/%.2i/%.2i " "%.2i:%.2i:%.2i\n", dt2.sdate.month, dt2.sdate.day, dt2.sdate.year, dt2.stime.hour, dt2.stime.minutes, dt2.stime.seconds); dt2 = clockKeeper (dt2); printf ("Updated date and time is %.2i/%.2i/%.2i " "%.2i:%.2i:%.2i\n\n", dt2.sdate.month, dt2.sdate.day, dt2.sdate.year, dt2.stime.hour, dt2.stime.minutes, dt2.stime.seconds); return 0; } I made some changes, most of them were missing commas etc, just because I cannot figure out what some of your variables are. If you include more information, such as an assignment rubric or something, I might be able to help more
anonymous
  • anonymous
i know it is, i only fixed minor errors, but the thing that puzzles me is your initial struct. every time i have used a struct, it is to identify certain parts. like struct zipcode { int label; double lon; double lat; }; so i cant figure out why you are trying to return anything from a stuct
anonymous
  • anonymous
one thing i can tell you though is that you are going to need another ; at the ending } of your struct

Looking for something else?

Not the answer you are looking for? Search for more explanations.