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
lisov135 [29]
3 years ago
9

Write a program that prints a one-month calendar. The userspecifies the number of days in the month and the day of the weekon wh

ich the month begins. The numerical dates must line up sothat the rightmost digit of the date is aligned with the rightmostdigit of the date above or below it (if there are anysuch). Below is an example output showing theformat you should use. The user input is shown as underlinedtext.Enter number of days in month: 31Enter starting day of the week (1=Sun, 7=Sat): 3 1 2 3 4 56 7 8 9 10 11 1213 14 15 16 17 18 1920 21 22 23 24 25 2627 28 29 30 31This program isn’t as hard as it might seem. The mostimportant part is a for statement that uses a variable i to countfrom 1 to n, where n is the number of days in a month, printingeach value of i. Inside the loop, an if statement testswhether i is the last day in a week; if so, it prints anewline. Note that the two digit dates that start a week arealigned with the left margin.Here's what I have so far.#includeint main(){int i,days,start;printf("Enter number of days in month:",days);scanf("%d", &days);printf("Enter starting day of the week (1=Sun, 7=Sat):",start);scanf("%d", &start);for(i=1;i<=days;i++) { printf("%3d", i); if(i == 7 || i == 14 || i == 21 || i == 28) { printf("\n"); } }return 0;}
Engineering
1 answer:
Rama09 [41]3 years ago
8 0

Answer:

See explaination

Explanation:

#include<stdio.h>

#include<conio.h>

int main()

{

int days,start,i;

printf("Enter number of days in month: ");

scanf("%d",&days);

printf("Enter starting day of the week (1=Sun, 7=Sat):");

scanf("%d",&start);

printf("\nSun Mon Tue Wed Thu Fri Sat\n");

for(i=0;i<start-1;i++)

printf(" ");

for(i=1;i<=days;i++)

{ if (i<=9)

printf(" ");

printf("%d",i);

if ((start-1+i)%7==0&&i!=days)

printf("\n");

else

printf(" ");

}

printf("\n");

getch();

}

You might be interested in
PLS HELP ME
Oksana_A [137]

Answer:

The Euler buckling load of a 160-cm-long column will be 1.33 times the Euler buckling load of an equivalent 120-cm-long column.

Explanation:

160 - 120 = 40

120 = 100

40 = X

40 x 100 / 120 = X

4000 / 120 = X

33.333 = X

120 = 100

160 = X

160 x 100 /120 = X

16000 / 120 = X

133.333 = X

4 0
3 years ago
What must engineers keep in mind so that their solutions will be appropriate?
vekshin1

Answer:

Context

Explanation:

It is of great value for an engineer to keep the context of his/her experiment in mind.

7 0
3 years ago
The advantage of using rose bud tips is that they:
Jlenok [28]

Answer:

The advantage to using a rosebud tip is that it expands the flame temperature over a wider area vs using a #0 size tip.

Explanation:

Hope this helped Mark BRAINLIEST!!

3 0
3 years ago
In a hydraulic system, accumulator is a device that collects liquid and keeps the liquid under pressure.
Bumek [7]
The answer is: true
6 0
3 years ago
I need ideas for what to build because I have some spare wood.
Misha Larkins [42]

Answer:

small guitar with no strings?

Explanation:

it would be fun to make i think

6 0
3 years ago
Other questions:
  • You can divide a surface by drawing a line through it
    9·2 answers
  • Use the APWA 5600 methodology to compute the 1/25 design discharge for the following catchment. The catchment area consists of 1
    9·1 answer
  • The creation of designer drugs is outpacing the ability of society to enact laws to prohibit them. Many of these substances have
    11·1 answer
  • In this type of projection, the angles between the three axes are different:- A) Isometric B) Axonometric C) Trimetric D) Dimetn
    11·1 answer
  • Different Gauss quadrature formulae predict different values for the same integral a. True b. False
    11·1 answer
  • All brake lights are dimmer than normal. Technician A says that bad bulbs could be the cause. Technician B says that high resist
    6·1 answer
  • Help me i need this bad :)
    14·1 answer
  • Describe how a cavity wall works and sketch its major construction features. What aspects of cavity wall construction are most c
    5·1 answer
  • 3. A particle is projected to the right from the position S = 0, when an initial velocity of 8 m/s. If the acceleration of the p
    6·1 answer
  • 40 POINTS IF ANSERED WITHIN 10 MINS
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!