1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Marrrta [24]
3 years ago
13

Write a c program that prompts a user to input the current month, day and year. store the data entered in a suitably defined str

ucture and display the date in an appropriate manner.
Computers and Technology
1 answer:
NikAS [45]3 years ago
8 0

#include <stdio.h>

#include <time.h>

int main()

{

   time_t s, val = 1;

   struct tm* current_time;

   

   s = time(NULL);

   

   current_time = localtime(&s);

   

   printf("Day of the month = %d\n",current_time->tm_mday);

   printf("Day in this year = %d\n",current_time->tm_yday);

   printf("Day in this week = %d\n",current_time->tm_wday);

   printf("Month of this year = %d\n",(current_time->tm_mon + 1));

   printf("Current year = %d\n",(current_time->tm_year + 1900));

   printf("hour:min:sec = %02d:%02d:%02d\n",

          current_time->tm_hour,

          current_time->tm_min,

          current_time->tm_sec);

   

   return 0;

}

You might be interested in
The research conducted by Gretta's Garden suggests that besides being able to afford plants for their homes and gardens, the onl
lisov135 [29]

Answer:

Network TV.

Explanation:

Network TV is the best option in this scenario because it is more appealing as compared to other media and people have shown more interest in this media.

7 0
4 years ago
3 component of a computer
madam [21]

Answer:

Hardware

software

Humanware

6 0
4 years ago
Which of the following is the correct way for writing JavaScript array?
Ostrovityanka [42]
<h3>\large\bold{\underline{\underline{Answer :-}}}</h3>

<h3> C. var salaries = new Array(39438,39839,83729) </h3>

8 0
2 years ago
Read 2 more answers
Hodaya missed several days of her online nursing class and needs to catch up. The most effective way she can do
Snowcat [4.5K]

Answer

send an individual e-mail to her teacher for advice.

8 0
3 years ago
Read 2 more answers
Chris wants to view a travel blog her friend just created. Which tool will she use?
wolverine [178]

Answer:

Web browser

Explanation:

7 0
3 years ago
Other questions:
  • The goal of conducting an incident analysis is to ascertain weakness. Because each incident is unique and might necessitate a di
    8·1 answer
  • What is the main function of the motherboard?
    12·1 answer
  • The manager of a football stadium wants you to write a program that calculates the total ticket sales after each game. There are
    6·1 answer
  • Which of the following does NOT describe a node?
    10·2 answers
  • Describe, step by step, how to create an account for a computer on the domain controller.
    11·1 answer
  • Which tool is best used to test an electrical current for a power source?
    8·1 answer
  • How many lines of text are in your questionnaire document
    5·1 answer
  • Write down the functions of network layer in your own words.ASAP
    14·1 answer
  • Is it safe for me to use normal glue to stick things on my laptop like stickers or pics?
    12·2 answers
  • What features could be improved in microsoft word?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!