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
Sophie [7]
2 years ago
13

Write a C programto convert entered number of days intoyears,months and days​

Computers and Technology
1 answer:
MaRussiya [10]2 years ago
4 0

Answer:

#include <stdio.h>

#define DAYSINWEEK 7

 

void main()

{

   int ndays, year, week, days;

 

   printf("Enter the number of days\n");

   scanf("%d", &ndays);

   year = ndays / 365;

   week =(ndays % 365) / DAYSINWEEK;

   days =(ndays % 365) % DAYSINWEEK;

   printf ("%d is equivalent to %d years, %d weeks and %d daysn",

           ndays, year, week, days);

}

Explanation:

You might be interested in
Create a new data frame, first_south, by subsetting titanic to include instances where a passenger is in the first class cabin (
Virty [35]

The data frame first_south is created using first_south = (titanic['Pclass']==1) & (titanic['Embarked']=='S')

<h3>How to create the data frame?</h3>

To do this, we make the following assumptions:

  • The pandas module has been loaded as pd
  • The dataset has also been loaded as titanic

When pclass column is 1.

This is represented as:

titanic['pclass']==1

When the passenger boards from Southampton.

This is represented as:

titanic['Embarked']=='S'

So, we have:

first_south = (titanic['Pclass']==1) & (titanic['Embarked']=='S')

Read more about data frames at:

brainly.com/question/16524297

#SPJ1

4 0
1 year ago
Typically, a programmer develops a programâs logic, writes the code, and ____ the program, receiving a list of syntax errors.
miv72 [106K]
"debugs" is the answer
4 0
3 years ago
Determine which careers you can enter after completing a training program and which careers require a college degree.
KonstantinChe [14]

Answer: statistician automotive engineer customer service specialist data modeler broadcast technician video systems technician

Explanation:

8 0
2 years ago
What is used to configure data sources for applications that require access to a database?
Radda [10]
A network is used to configure data sources for applications that require access to a database?
6 0
3 years ago
What does the following function return? void index_of_smallest(const double all, int startindex, int numberOfSlots); A. a doubl
Flauer [41]

Answer:

nothing

Explanation:

Because the return type of the function is void. void means does not return any thing.

The syntax of the function:

type name( argument_1, argument_2,......)

{

  statement;

}

in the declaration the type define the return type of the function.

it can be int, float, double, char, void etc.

For example:

int count( int index);

the return type of above function is int. So, it return integer.

similarly,

void count(int index);

it return type is void. So, it does not return any thing.

7 0
3 years ago
Other questions:
  • What does in-private or incognito browsing do?
    5·1 answer
  • In mathematics, the factorial of a positive integer n, denoted as n! , is the product of all positive integers less than or equa
    10·2 answers
  • When a server crashes and goes offline on a network, which of the following helps to determine that the server is unavailable?
    9·1 answer
  • What does media saturation mean?
    15·1 answer
  • If a driving who is under the age of 21 is stopping by a law enforcement officer and shown to here a bal of .02 or greater, he o
    14·1 answer
  • Digital certificates can be used for each of these EXCEPT _____. A. to encrypt channels to provide secure communication between
    13·1 answer
  • An
    9·1 answer
  • 1. Write program, WriteData.java, that writes the following data to file books.txt. Include the semicolons. Fiction;Abraham Linc
    11·1 answer
  • When a computer or digital device is used as a storage device or in the facilitation of an offense, it is argued to be ____ to t
    14·1 answer
  • How do you put text in MS publisher?<br><br> When do you use text wrapping?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!